Guenadi N Jilevski's Oracle BLOG

Oracle RAC, DG, EBS, DR and HA DBA BLOG

Managing and administering Oracle ONE NODE RAC configurations with racone and Omotion utilities

Managing and administering Oracle ONE NODE RAC configurations with racone and Omotion utilities

In previous posts related to “RAC installation” we looked at installing RAC ONE Node database 11gR2. Alternatively we can have the cluster up and running and we will install the Oracle Grid infrastructure and Oracle Real application cluster binaries on all nodes of the cluster without creating a database. Complete a software only install of Oracle Real Application Clusters on all nodes in the cluster where you want to deploy Oracle RAC One Node, or nodes that are candidates for Omotion or cold failover. To use Oracle RAC One Node Utilities discussed in this appendix, you must apply patch 9004119 to your 11.2.0.1 database home. NOTE: You must have Oracle RAC software home on any node in the cluster where you could relocate (using Omotion) the Oracle RAC One Node instance or where it could failover to if the original node fails. You will be asked for this candidate list of nodes during the initialization of Oracle RAC One Node.

Oracle RAC One Node is currently only supported as an Administrator Managed Database with Oracle Real Application Clusters 11g Release 2. Creating an Oracle RAC One Node database is the same as any other Oracle RAC database however this database has only one instance. From the Oracle RAC database home on the node where you want to run Oracle RAC One Node, start DBCA (the database configuration assistant). During Step 3 Database Identification, ensure the radial button for “Admin- Managed” is selected. Choose a Global Database Name, SID prefix and the node where you want to run the database. For Oracle RAC One Node, the Global Name must be the same as the SID prefix and they must be less than or equal to 8 characters in length.

Pre-requisites for using the Oracle RAC One Node Utilities

The following pre-requisites must be in place before executing any of the Oracle RAC One Node utilities.

1. You must have applied patch 9004119 to the Oracle Database home

2. Set the ORACLE_HOME environment variable to the database home used for the Oracle RAC

One Node database

3. You must be logged in as the owner of the Oracle Database home

4. SSH must be set for the user running the utility

The Oracle RAC One Node utilities can be run from any node in the cluster. The default location for the logs created by the utilities is the $ORACLE_HOME/log/racone/, if the user has permissions to write to the directory, where ORACLE_HOME is the database home for the Oracle RAC One Node database. Otherwise the logs will be in the users $HOME directory I.E /home/oracle/racone/*.log

How to Configure an Oracle RAC One Node Database

As the user who is the owner of the Oracle RAC Database Home (Linux oracle user in the convention of the book), run the configuration utility. First choose the database from the list that you want to configure. You will then be prompted to enter the server(s) where this database is allowed to run. This list will be used for cold failover of the database as well as candidate servers when the Omotion utility is run. The utility will provide you with a list of servers that are part of the cluster, which you can use for this list. The servers must currently either be in the FREE pool or in the GENERIC pool. Servers that are part of a user defined server pool are not eligible as candidate servers for Oracle RAC One Node. The server where you created the database will not be seen in the list and DO NOT enter it in your response. The server where the instance is running will always be in the candidate list. If you enter the server where the instance is running, the utility will exit with an error.

Note: the configuration utility must be run in order for the other Oracle RAC One Node utilities to work.

Sample of Oracle RAC One Node configuration utility

$ ./raconeinit

Candidate Databases on this cluster:

#         Database         RAC One Node         Fix Required

===         ========         ============     ============

[1]         racdb1             YES             N

Enter the database to initialize [1]: 1

Database racdb1 is now running on server raclinux1

Candidate servers that may be used for this DB:raclinux2 raclinux3

Enter the names of additional candidate servers where this DB may

run (space delimited): raclinux1

Database configuration modified

The raconeinit utility will modify the instance name to dbname_1. i.e. for the example above the instance name is changed from racdb1 to racdb_1.

Rolling Patch Application and Instance Relocation using Omotion

The Omotion utility allows you to move the Oracle RAC One Node instance from one node to another in the cluster. There are several reasons you may want to move the instance such as the node is overloaded so you need to balance the workload by moving the instance, or you need to do some operating system maintenance on the node but you want to eliminate the outage for application users by moving the instance to another node in the cluster. To migrate an instance without client interruption, the application connections must use client connections that are integrated with Fast Application Notification (FAN). For information on using FAN, please read the Oracle Real Application Clusters Administration and Deployment Guide as well as the Automatic Workload Management Technical White Paper available on OTN. You can also use connections with Transparent Application Failover (TAF) enabled (When using TAF, you should always enable FAN). For more information on TAF, please read the Oracle Net Services documentation and the Oracle Call Interface Programmers Guide. If you do not use FAN or TAF, any in-flight transactions will be allowed to complete (as long as they complete within the timeout period entered which has a maximum of 30 minutes) then clients will receive an error when their session is terminated due to the shutdown of the Oracle RAC One Node instance (E.G. ORA-3113 End of Line on communication channel). Since the new instance will be running, the client can immediately login again.

Note: If the shutdown of the original instance takes longer than the set timeout, we will abort this

database instance. The new instance will then perform recovery to cleanup any transactions that were aborted due to the shutdown.

Recommendation: Tune instance recovery to meet the needs of your organization. 7

From any node in the cluster, run the Omotion utility. The utility will prompt you to choose the database to be migrated, the maximum amount of time you want to wait for transactions to complete before shutting down the current Oracle RAC One Node instance, and the node in the cluster where you want to move the instance to. This is time in minutes to a maximum of 30 minutes:

Sample Output from Omotion

$ ./Omotion

RAC One Node databases on this cluster:

#         Database         Server                 Fix Required

===         ========         =====================     ============

[1]         racdb1             raclinux1                 N

[2]         racdb2             raclinux2                 N

Enter number of the database to migrate [1]: 2

Specify maximum time in minutes for migration to complete (max

30) [30]: 5

Available Target Server(s) :

#         Server             Available

===         ===============     =========

[1]         raclinux3             Y

[2]          raclinux2             Y

Enter number of the target node [1]: 1

Omotion Started…

Starting target instance on raclinux3

Migrating sessions …

Stopping source instance on raclinux2

Omotion Completed…

=== Current Status ===

Database racdb2 is running on node raclinux3

If the migration of the instance was for a short time in order to complete maintenance, you can run Omotion after the maintenance is complete to move the instance back to its original node. The Omotion utility provides a verbose option (-v) that provides additional details during the migration.

Sample Output from Omotion with Verbose option

$ ./Omotion -v

RAC One Node databases on this cluster:

#     Database     Server             Fix Required

===     ========     =================     ============

[1]     racdb1        raclinux3             N

[2]     racdb2         raclinux2             N

Enter number of the database to migrate [1]: 2

Specify maximum time in minutes for migration to complete (max

30) [30]: 5

racdb2 Database is administrator managed.

racdb2 Database is running in racdb2 Server Pool.

Current Running instance: racdb2_1

Current Active Server : raclinux2

Available Target Server(s) :

#         Server                 Available

===         ==================         =========

[1]         raclinux1                 Y

[2]         raclinyx3                 Y

Enter number of the target node [1]: 1

Omotion Started…

Starting target instance on raclinux1

Migrating sessions …

Stopping source instance on raclinux2

Omotion Completed…

=== Current Status ===

Database racdb2 is running on node raclinux1

You can also provide the database name and migration time as inputs on the command line.

Output from Omotion with Command Line Inputs

$ ./Omotion -d racdb2 -m 5

Available Target Server(s) :

#         Server             Available

===         ===============     =========

[1]        raclinux1             Y

[2]         raclinux3             Y

Enter number of the target node [1]: 1

Omotion Started…

Starting target instance on raclinux1

Migrating sessions …

Stopping source instance on raclinux2

Omotion Completed…

=== Current Status ===

Database racdb2 is running on node raclinux1

Checking the Status of Oracle RAC One Node

To make it easy to see the status of your Oracle RAC One Node databases, a status utility is included. This can be run on any node in the cluster to provide a summary of the Oracle RAC One Node databases in the cluster. The output displays the node on which the databases are currently running, whether a fix is required as a result of a failure, and the candidate servers for Omotion for instance migration for each database.

Sample Output from Oracle RAC One Node Status utility

$ ./raconestatus

RAC One Node databases on this cluster:

Database     UP     Fix Required         Current Server         Candidate Server Names

========     ==     ============     ===============     ======================

racdb1         Y     N             raclinux3         raclinux3 raclinux2 raclinux1

racdb2         Y     N             raclinux2        raclinux2 raclinux3

Fixing Configuration Issues

When you run any of the Oracle RAC One Node utilities, they will check the configuration and exit if they find any problem with the configuration. A problem in the configuration is generally a result of something happening in the cluster (e.g. a node rebooted) while the Omotion utility was running. To reset the configuration, run the raconefix utility. The raconefix utility will display all RAC One Node databases running on the cluster and whether there is a configuration issue. If the “Need Fix” column has a Y, then raconefix utility needs to be run. Enter the number of the database to be fixed when prompted

Sample output from raconefix

$ ./raconefix

RAC One Node databases on this cluster:

#         Database         Server                 Fix Required

===         ========         =====================     ============

[1]         racdb1             raclinux3                  N

[2]         racdb2            raclinux2, raclinux1              Y

Enter number of the database to fix [1]: 2

racdba Service Server Names is different than the DB Server Names

This Database need to be fixed.

RACOneNode Database racdb2 fixed.

Scaling Oracle RAC One Node to Oracle RAC

When your application requirements grow either in the availability requirements or the scalability requirements, it is a simple process to migrate your Oracle RAC One Node database to an Oracle RAC database. Since you are already running in a cluster, you need to run the raconetorac utility and then use DBCA to add new instances to the database. Note: During the migration, the Oracle RAC One Node instance will be shutdown and restarted.

Sample execution of the raconetorac utility

$ ./racone2rac

Candidate Databases on this cluster:

#         Database         RACOne Node         Fix Required

===         ========         =============     ============

[1]         db11g             YES             N

Enter the database to convert to one node RAC database [1]:

You are converting db11g to single instance Oracle RAC database

running on raclinux2.

Do you want to Continue? [Y]es or [N]o? Y

Please wait, this may take a few minutes to finish…………

Database configuration modified.

Run dbca to add as much instances as you want to this database.

Best Practices for Deploying Oracle RAC One Node

Most database administration activities do not change with an Oracle RAC One Node database. There are a few items that you should be aware of if you are moving from a single instance database on a standalone server. In an Oracle RAC database, each instance has its own thread of redo, its own redo log files, and its own undo tablespace. When you initiate Omotion, we bring up a second instance and as long as you are using Oracle Managed Files (OMF), we will automatically create an additional thread of redo, the appropriate redo logs, and the undo tablespace required for the new instance. The new redo and undo will be built using the same characteristics as the initial instance.

Recommendation: Size the redo and undo on the original instance to meet your applications

requirements before initiating an Omotion. Note that if you modify them after the first Omotion has been executed; you will need to update all the redo logs and all the undo tablespaces. All database connections should use the SCAN8. This will allow the client connections to easily connect to the database instance independently of which node in the cluster it is currently running on. Do not use node VIPs or Hostnames in the connection string since this will require modifying the client connect string whenever a failover or Omotion takes place. In an Oracle RAC database, instances can have different parameter settings. When Omotion is used to move the database instance, we bring up a second instance and shutdown the initial instance. In order to ensure that all instances have the same parameter settings, you must use SCOPE= both and SID=’*’  when modifying parameters.

 

For additional information see MOS formerly Metalink Note ID: 220970.1

May 27, 2010 - Posted by | oracle

8 Comments »

  1. I am in the process of installing 11g R2 grid infrastructure. I am stuck at SCAN. Please help me configuring the DNS and host files. I do not want to use GNS. Please give me steps to configure DNS files. Does scan require a physical ip or virtual IP. I am waiting for your advice.

    Thanks and regards,
    Mehmood

    Comment by mehmood | June 4, 2010 | Reply

    • Hello,

      PLEASE MAKE SURE ALL THE PREREQUSITES FOR INSTALLING ORACLE 11GR2 GRID ARE MET!

      Please configure SCAN as 3 or more IP addresses in the DNS. The IP addresses MUST be in the SAME sub-net as the VIP for the RAC cluster.

      You can put a SCAN entry in the hosts file. In this case you will have only one IP address. Make it also in the same subnet as the VIP.

      PLEASE REMEMBER THAT WITH ONE IP ADDRESS AS A SCAN YOU WILL BE ABLE TO INSTALL 11GR2. tHE cluvfy AT THE END IN THE CONFIGURATION WILL FAIL.
      WITH ONE SCAN IP ADDRESS YOU STILL CAN LEARN AND EXPLORE ORACLE RAC 11GR2. THIS SHOULD NOT BE USED FOR OTHER THAN SANDBOX. DO NOT USE FOR BUSINESS PURPOSE.

      Please keep me posted how it goes.

      Good luck.

      Guenadi

      Comment by gjilevski | June 5, 2010 | Reply

  2. Hai,

    Nice post of RAC ONE node. I was searching for RAN ONE node information & your blog is very helpful.

    I would like to do the same on solaris-sparc. Is it ok?

    My goal:
    Install & configure ONE database with two instances on same solaris server. One instance will be active and other will be passive (cold fail over).

    Please suggest high level steps to follow.

    thanks

    Comment by Mubeen | September 26, 2010 | Reply

  3. [...] TAF and verify the TAF failover while migrating with Omotion the instance to another node. Managing Oracle ONE NODE RAC was a subject of an earlier article. The tnanames.ora entry RUPTAF is in the ANNEX. We will run a [...]

    Pingback by Oracle RAC and Oracle ONE NODE RAC 11.2.0 and Transparent Application Failover (TAF) « Guenadi N Jilevski's Oracle BLOG | October 3, 2010 | Reply

  4. [...] 994114 had to be applied to provide the utilities for Oracle RAC One Node managements as described here. Starting with Oracle 11gR2 11.2.0.2 srvctl utility adds features to relocate RAC One Node [...]

    Pingback by Oracle 11g R2 (11.2.0.2) RAC One Node management « Guenadi N Jilevski's Oracle BLOG | October 7, 2010 | Reply

  5. [...] Managing and administering Oracle ONE NODE RAC configurations with racone and Omotion utilities In previous posts related to "RAC installation" we looked at installing RAC ONE Node database 11gR2. Alternatively we can have the cluster up and running and we will install the Oracle Grid infrastructure and Oracle Real application cluster binaries on all nodes of the cluster without creating a database. Complete a software only install of Oracle Real … Read More [...]

    Pingback by Managing and administering Oracle ONE NODE RAC configurations with racone and Omotion utilities (via Guenadi N Jilevski’s Oracle BLOG) « Levi Pereira's | December 9, 2010 | Reply

  6. If needed you may find this useful : http://bdrouvot.wordpress.com/2012/12/13/rac-one-node-avoid-automatic-database-relocation/

    Bertrand

    Comment by bdrouvot | December 13, 2012 | Reply

  7. I’m amazed, I must say. Seldom do I encounter a blog that’s both educative
    and amusing, and without a doubt, you’ve hit the nail on the head.
    The issue is something that too few people
    are speaking intelligently about. I’m very happy I came across this in
    my search for something relating to this.

    Comment by woodwork projects | February 17, 2014 | Reply


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 779 other followers

%d bloggers like this: