Home > Oracle Rac > Manually converting Single Instance to RAC

Manually converting Single Instance to RAC

Steps taken from http://orapark.wordpress.com/

Pre-requisite setup:

  • I assume there is a Oracle single instance by name prod running on the Hostz. All the datafiles of this instance are on ext3 filesystem. Oracle version is 10.2.0 and OS is RHEL 4.
  • Prepare a 2 node RAC with oracle clusterware and oracle rdbms software installed and configured. Don’t create database, just choose the option “Install software only”. Before you do this, shared disk has to be configured; in our case we are using ocfs2 as the shared file system. Host names of the rac nodes are HostA and HostB. Oracle version is 10.2.0, Oracle clusterware version is 10.2.0 and OS is RHEL 4
  • I assume that OS Oracle owner username is oracle on all the nodes. (ie., source HostZ and Target HostA and HostB ).
  • This document lists the steps required to covert the sigle instance database to RAC instances.



Clone single instance to One of the RAC nodes. (ie., single instance To single instance )

Clone the prod instance on HostZ to prod instance on HostA ( Retain the same instance name ie., prod ).


——-Login to Host A

Shutdown the instance prod on HostA.

Change the SID to prod1 ie., export it directly OR set it in the environment file $HOME/.bash_profile.

$export ORACLE_SID=prod1

Prepare the parameter file initprod1.ora by copying the existing $ORACLE_HOME /dbs / initprod.ora

Add the following RAC related parameters to initprod1.ora. Retain all the old parameters from prod.


Also update the initprod1.ora file with parameters related to second instance prod2, by prefixing the values with prod2.<parameter>= _ _ _. If the value is common to both instances you can say *.<parameter> =_ _ _ _ _.

Also modify the existing prod1 specific parameters by prefixing prod1. ie., prod1.<parameter>=_ _ _ _ _ _

( This is because, LATER we are going to create a common spfile from this initprod1.ora, which will be placed on the shared disk, and accessed by both nodes. )

Ultimately this is how my initprod1.ora file is looking like………..

*.dispatchers=’(PROTOCOL=TCP) (SERVICE=prodXDB)’


——-Login to HostA (As oracle user )

sql> connect / as sysdba


Now we have to create the Redo log file for instance prod2. It is good to have same size of redo log files on both nodes. Check the group and redo log size on the instance prod1 and create the Redo log files for prod2 instance.

sql> select group#,thread#,bytes/(1024*1024)mb from v$log;

GROUP 4 (‘/u03/oracle/oradata/prod/redo04.log’) size 50M,
GROUP 5 (‘/u03/oracle/oradata/prod/redo05.log’) size 50M,
GROUP 6 (‘/u03/oracle/oradata/prod/redo06.log’) size 50M;


Create a spfile on the shared disk(/u03) , which can be used by both instances.

sql>create spfile=’/u03/oracle/oradata/prod/spfileprod.ora’ from pfile;

sql>shutdown immediate;

Create a pointer to the shared spfile

$cd $ORACLE_HOME/dbs

Backup the existing pfile

$ mv initprod1.ora initprod1.ora.bak

$vi initprod1.ora



sql> startup

———Login to HostB (as oracle user)

$export ORACLE_SID=prod2

$cd $ORACLE_HOME/dbs

Point the init.ora to the common spfile.

$vi initprod2.ora



sql> startup

…………..Now your Single Node is converted to RAC.

STEP 4: Post conversion steps

1. Create the temporary tablespaces.

2. Create Undo tablespaces for each instance and add the entry to the spfile.

3. Put your database in Archivelog mode. Let the archive destination be on shared storage and have a common destination for both the instances. Having common destination makes the media recovery job easy.

3. Run the script catclust.sql which is present in$ORACLE_HOME/rdbms/admin. This will create some of the RAC views. You can run this from any one of the RAC nodes.

4. Add an entry in the oratab file.

5. Create listener from netca and add an entry Local_Listener and Remote_Listener to the spfile.


STEP 5: Register the instance and listener with the CLUSTER


Login to any one of the node

$cd $CRS_HOME/bin

$srvctl add database -d prod -o $ORACLE_HOME

$srvctl add instance -d prod -i prod1 -n HostA
$srvctl add instance -d prod -i prod2 -n HostB

srvctl start database -d prod

–>Listener is automatically registered with cluster when you create it from netca. Manual registering of Listener is not possible in 10g.
(Make sure to choose Cluster Configuration option)

If everything is fine you should see all the registered components Online as show below.

$crs_stat -t

Name Type Target State Host
———– ————————————————-
ora….tA.lsnr application ONLINE ONLINE HostA
ora….stA.gsd application ONLINE ONLINE HostA
ora….stA.ons application ONLINE ONLINE HostA
ora….stA.vip application ONLINE ONLINE HostA
ora….tB.lsnr application ONLINE ONLINE HostB
ora….stB.gsd application ONLINE ONLINE HostB
ora….stB.ons application ONLINE ONLINE HostB
ora….stB.vip application ONLINE ONLINE HostB
ora.prod.db application ONLINE ONLINE HostA
ora….d1.inst application ONLINE ONLINE HostA
ora….d2.inst application ONLINE ONLINE HostB



Categories: Oracle Rac
  1. No comments yet.
  1. No trackbacks yet.

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

%d bloggers like this: