In sweet memories of my ever loving brother "kutty thambi " ARUN KUMAR

Friday, December 11, 2009

Convert single instance to RAC instance Database

converting a single instance database to rac instance database:

Oracle provides following methods to convert a single instance database to RAC:

Grid Control
RCONFIG(from 10gR2)

here is an example of converting a single instance asm file database to rac instance database using rconfig,
for converting a normal database file system single instance to rac instance, before following
the steps
for converting the non-asm files to asm files using the steps as shown in the link

after converting a non-asm files to asm files system,

go the $ORACLE_HOME/assistants/rconfig/sampleXMLs
there u can find ConvertToRAC.xml file

recommended you to copy the file to any location for example

cp $ORACLE_HOME/assistants/rconfig/sampleXMLs/ConvertToRAC.xml /u01/convertdb.xml

Following illustrate how to convert single instance database to RAC using the RCONFIG tool:

The Convert verify option in the ConvertToRAC.xml file has three options:
  • Convert verify="YES": rconfig performs checks to ensure that the prerequisites for single-instance to RAC conversion have been met before it starts conversion
  • Convert verify="NO": rconfig does not perform prerequisite checks, and starts conversion
  • Convert verify="ONLY" : rconfig only performs prerequisite checks; it does not start conversion after completing prerequisite checks

modify the convertdb.xml file according to your environment. Following is the example:

sample ConvertToRAC.xml file edit as follows

here my database name to convert is "test"

xml version="1.0" encoding="UTF-8"?
--n:RConfig xmlns:n=""
--!-- Verify does a precheck to ensure all pre-requisites are met, before the conversion is attempted. Allowable values are: YES|NO|ONLY ----
--n:Convert verify="YES"--
--!--Specify current OracleHome of non-rac database for SourceDBHome ----
--n:SourceDBHome--/u01/app/oracle/product/10g/db_1--/n:SourceDBHome-----your source database home
--!--Specify OracleHome where the rac database should be configured. It can be same as SourceDBHome ----
--n:TargetDBHome--/u01/app/oracle/product/10g/db_1--/n:TargetDBHome-- ---your target database home
--!--Specify SID of non-rac database and credential. User with sysdba role is required to perform conversion ----
--n:SourceDBInfo SID="test"---------------your database name
--!--ASMInfo element is required only if the current non-rac database uses ASM Storage ----
--n:ASMInfo SID="+ASM1"---------------------your ASM Instance name
--n:Password--oracle--/n:Password-- ----your ASM instance password
--!--Specify the list of nodes that should have rac instances running. LocalNode should be the first node in this nodelist. ----
--n:Node name="rac1"/-------your rac1 hostname
--n:Node name="rac2"/------your rac2 hostname
--!--Specify prefix for rac instances. It can be same as the instance name for non-rac database or different. The instance number will be attached to this prefix. ----
--n:InstancePrefix--test--/n:InstancePrefix-----your database name
--!--Specify port for the listener to be configured for rac database.If port="", alistener existing on localhost will be used for rac database.The listener will be extended to all nodes in the nodelist ----
--n:Listener port="1551"/-----listener port number
--!--Specify the type of storage to be used by rac database. Allowable values are CFS|ASM. The non-rac database should have same storage type. ----
--n:SharedStorage type="ASM"------your storage type
--!--Specify Database Area Location to be configured for rac database.If this field is left empty, current storage will be used for rac database. For CFS, this field will have directory path. ----
--n:TargetDatabaseArea-- --/n:TargetDatabaseArea------leave blank
--!--Specify Flash Recovery Area to be configured for rac database. If this field is left empty, current recovery area of non-rac database will be configured for rac database. If current database is not using recovery Area, the resulting rac database will not have a recovery area. ----
--n:TargetFlashRecoveryArea-- --/n:TargetFlashRecoveryArea---leave blank

Once you modify the convert.xml file according to your environment, use the following command to run the tool:

go to $ORACLE_HOME/bin and run
./ rconfig /u01/convertdb.xml

finally, change sid in /etc/oratab as test1 in rac1 machine and test2 in rac2 machine
thats it.
then check
srvctl config database -d test
srvctl status database -d test
crs_stat -t

hope it will help you.

rajeshkumar g


Anonymous said...

i have followed your rac installation as well as converting single to rac via dbca it worked this iam following didnt worked my getting issues such as asm instace not started ,oracle not availble and diskgroup not mounted but i have checked all diskgroups are mounted all asm instances on both nodes are running /executing

Thnaks in Advance

Anonymous said...

Hi ,
Iam trying your articles all work without issues but only conversion through rconfig is not getting implemented ........and i have checked all asm disk groups are mounted ...all resources are up ....
but conversion fails and failure is during conversion my listener get failed

Steffey Allyson said...
This comment has been removed by the author.