Convert 11gR2 non-RAC database to RAC database using rconfig

August 4, 2010

This post talks about the Conversion of  11gR2 non-RAC database to RAC database using rconfig.

Oracle provides 3 methods to convert non-RAC single instance database to RAC databases:

1. DBCA
2. rconfig
3. Enterprise Manager

All the 3 have their own benefits and can be used to suit one’s needs. My recent work involved the conversion of non-RAC single instance database to RAC database using rconfig, although I’ve tested all the 3 methods but concluded on rconfig.

Pre-requisites:

1. Configure Shared Storage setup ASM, NFS (NAS) or clustered storage.

2. A clustered Grid Infrastructure install with at least one Scan listener address. See

Oracle Grid Infrastructure Installation Guide 11g Release 2 (11.2) Linux

3.  rconfig imposes a restriction on the choice of listener. The listener must be the default listener, and it must run from the Grid Infrastructure home.

srvctl add listener -p 1522

After conversion, you can reconfigure the listener as required.

4.  Install Clustered Oracle Database Software as per documentation, this can be done by choosing the right configuration option. Refer to :

http://download.oracle.com/docs/cd/E11882_01/install.112/e10813/racinstl.htm#BABJGBHB

I’ve installed the new 11gR2 clustered ORACLE_HOME at

/u01/app/oracle/product/11.2.0/db_2

on both the nodes orarac01 and orarac02



Converting Single Instance Database using rconfig

1. As an “oracle” OS user navigate to

$ORACLE_HOME/assistants/rconfig/sampleXMLs

2. Open the sample file ConvertToRAC_AdminManaged.xml using a text editor such as vi. This XML sample file contains comment lines that provide instructions on how to edit the file to suit your site’s specific needs.

3.  Ensure you edit the xml with convert verify="ONLY"
The following are the sample entries:


<!--Specify current OracleHome of non-rac database for SourceDBHome -->
 /u01/app/oracle/product/11.2.0/db_1
<!--Specify OracleHome where the rac database should be configured. It can be same as SourceDBHome -->
 /u01/app/oracle/product/11.2.0/db_2
<!--Specify SID of non-rac database and credential. User with sysdba role is required to perform conversion -->

...

<!--Specify the list of nodes that should have rac instances running for the Admin Managed Cluster Database. LocalNode should  be the first node in this nodelist. -->

...

<!--Specify Database Area Location to be configured for rac database.If this field is left empty, current storage will be use d for rac database. For CFS, this field will have directory path. -->
 +DATA

4.  Move the spfile to the shared location, in this case the Single Instance Database was hosted on file system, in this process we will move the datafiles from file system storage to ASM.

So create spfile in the shared disk location


SQL>create spfile='+DATA/TEST/spfiletest.ora' from pfile;

You can check if the file is created through “asmcmd”

5. Take a backup of existing $SOURCE_ORACLE_HOME/dbs/initTEST.ora, and create a new $SOURCE_ORACLE_HOME/dbs/initTEST.ora with the following parameter:


spfile='+DATA/TEST/spfiletest.ora'

6. Restart the Database

7. Now lets test if “rconfig” is ready for conversion, navigate to $ORACLE_HOME/bin and issue the following command


$./rconfig $ORACLE_HOME/assistants/rconfig/sampleXMLs/ConvertToRAC_AdminManaged.xml

The above command validates( as we’ve set convert=”ONLY”) if rconfig is ready for conversion. If the output throws any error, diagnose and troubleshoot to fix the issue. Refer to the following output for successful validation:


...

 Operation Succeeded

There is no return value for this step

..

8. Now are we are ready for conversion, edit the xml file “ConvertToRAC_AdminManaged.xml” and change:

from:


..
 <n:Convert verify="ONLY">
..

to


..
 <n:Convert verify="YES">
..

9. Perform the conversion


$./rconfig $ORACLE_HOME/assistants/rconfig/sampleXMLs/ConvertToRAC_AdminManaged.xml

The conversion will take some time to complete. The progress can be monitored from the logs located at $ORACLE_BASE/cfgtoollogs/rconfig

10. Once the conversion is complete you’d get a similar message in step 7.

11. Perform sanity checks and tweak the listener to suit your needs.

That sums up the procedure to convert Single Instance Oracle Database to RAC database. Please do share your thoughts and comments.

Reference:

http://download.oracle.com/docs/cd/E11882_01/install.112/e17214/cvrt2rac.htm#BABGGEGJ

6 Responses to “Convert 11gR2 non-RAC database to RAC database using rconfig”

  1. saransh soni Says:

    Hello,
    Thanks for nice document, please clear my below doubts
    When I re create spfile & pfile of source non-RAced database & restart it how datafiles are moved to sahred location because initially there are in local file system only.

    Do I need to execute rconfig from source_oracle_home or from node1 of newely installed clustered oracle home.

    rconfig file says that old oracle home should also have same type of storage as will be of RAC database so do we need to first convert storage type of source database to ASM then need to execute rconfig.

    Please clear above doubts

    Reagrds
    Saransh Soni

  2. Zakki Ahmed Says:

    Hi Saransh,

    your first question:

    When I re create spfile & pfile of source non-RAced database & restart it how datafiles are moved to sahred location because initially there are in local file system only.

    -> This is managed by rconfig, when you specify the ASM settings, here i assume you have already allocated space on ASM and “+DATA” as a disk group as RAC configured. So for instance in this case orarac01 is the host, and the details of the asm are supplied in the configuration file ConvertToRAC.xml. Hence as a part of rconfig which at background uses rman to move the data across from local file system to ASM.

    Second Question:

    Do I need to execute rconfig from source_oracle_home or from node1 of newely installed clustered oracle home.

    -> Yes

    Third Question:

    Not necessarily, you use the same location/datafiles for conversion to RAC or move it to ASM. In this case I moved from file system to ASM.

    Hope that helps.

    Regards,

    Zakki

  3. saransh soni Says:

    Thanks for reply,
    As I understand typical process will be as below-
    #create spfile from pfile at shared location for source nonRAC database & then take backup of pfile & create new one with spfile= parameter.

    #Restart source database so that it is started with spfile located at shared location.

    #While configuring converttoRAC.xml from source NONRAC database only I have below doubts-
    *If my source database is using local file system only for database storage then should I left blank ASMinfo part in xml file.
    *For parameter SharedStorage type I will write ASM but in xml file comment for sharedstorage type parameter is –

    So I am confused here as my non RAC database is using local file system only while RAC will use ASM as storage option.
    Please clear these doubts.

    Regards
    Saransh Soni

  4. Viktoria Kolesnikova Says:

    Hello Zakki –

    Thank you for the blog. It is very useful.
    I have the following question:
    rconfig converts datafiles to OMF structure.
    Is it possible to prevent this and keep the files in their current location?

    Thanks –
    Viktoria


  5. It is in point of fact a great and helpful piece of information.
    I’m glad that you just shared this helpful info with us. Please stay us up to date like this. Thanks for sharing.

  6. Johnk913 Says:

    Just wanna input on few general things, The website pattern is perfect, the subject material is real excellent. Believe those who are seeking the truth. Doubt those who find it. by Andre Gide. bkeegdkdefaa


Leave a comment