In Previous article we learned about overview of RCONFIG . In this Article we will see Conversion of Single Instance DB to RAC DB with RCONFIG

Prerequisites :

Single Instance DB Name RAC DB name RAC Instance Node  RAC Instance Name RAC Node Name
test TEST  Node 1 db1 RAC1
Node 2 db2 RAC2

Step 1 : Check details of Single Instance DB :

[oracle@rac1 ~]$ export ORACLE_SID=test
[oracle@rac1 ~]$ sqlplus / as sysdba

SQL*Plus: Release Production on Tue Mar 13 15:58:35 2018

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options

SQL> select name,open_mode from v$database;

--------- --------------------

SQL> select instance_name,host_name from v$instance;


SQL> set lines 1000
SQL> select instance_name,host_name from v$instance;

---------------- ----------------------------------------------------------------
test		 rac1.localdomain


SQL> select file_name from dba_data_files;



Here we can see that Single Instance DB name is “TEST” , located on RAC1 node and storage is non-ASM.

Step 2 : Go to $ORACLE_HOME/assistants/rconfig/sampleXMLs

[oracle@rac1 ~]$ cd $ORACLE_HOME/assistants/rconfig/sampleXMLs
[oracle@rac1 sampleXMLs]$ ll
total 12
-rw-r--r-- 1 oracle oinstall 2770 Mar 13 16:17 ConvertToRAC_AdminManaged.xml
-rw-r--r-- 1 oracle oinstall 2804 Mar 22  2010 ConvertToRAC_PolicyManaged.xml
[oracle@rac1 sampleXMLs]$

Step 3 : Make necessary changes to ConvertToRAC_AdminManaged.xml file as follows :

[oracle@rac1 sampleXMLs]$ cat ConvertToRAC_AdminManaged.xml 
<?xml version="1.0" encoding="UTF-8"?>
<n:RConfig xmlns:n=""
           xsi:schemaLocation=" rconfig.xsd">
<!-- 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 -->
<!--Specify OracleHome where the rac database should be configured. It can be same as SourceDBHome -->
<!--Specify SID of non-rac database and credential. User with sysdba role is required to perform conversion -->
              <n:SourceDBInfo SID="test">
<!--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. -->
	        <n:Node name="rac1"/>
	        <n:Node name="rac2"/>
<!--Specify RacOneNode along with servicename to convert database to RACOne Node -->
              <!--n:RacOneNode  servicename="salesrac1service"/-->
<!--Instance Prefix tag is optional starting with 11.2. If left empty, it is derived from db_unique_name.-->
<!-- Listener details are no longer needed starting 11.2. Database is registered with default listener and SCAN listener running from Oracle Grid Infrastructure home. -->
<!--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. ASM credentials are no needed for conversion. -->
	      <n:SharedStorage type="ASM">
<!--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. -->
<!--Specify Fast 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. -->
[oracle@rac1 sampleXMLs]$

Here I have passed source DB home , target DB home , source database SID , password for sys user and node details.

Step 4 : Run rconfig command from $ORACLE_HOME/bin/rconfig for actual conversion.

[oracle@rac1 sampleXMLs]$  /u01/app/oracle/product/11.2.0/dbhome_1/bin/rconfig ConvertToRAC_AdminManaged.xml 
Converting Database "test" to Cluster Database. Target Oracle Home: /u01/app/oracle/product/11.2.0/dbhome_1. Database Role: PRIMARY.
Setting Data Files and Control Files
Adding Database Instances
Adding Redo Logs
Enabling threads for all Database Instances
Setting TEMP tablespace
Adding UNDO tablespaces
Adding Trace files
Setting Fast Recovery Area
Updating Oratab
Creating Password file(s)
Configuring Listeners
Configuring related CRS resources
Starting Cluster Database
<?xml version="1.0" ?>
<RConfig version="1.1" >
        <Result code="0" >
          Operation Succeeded
      <ReturnValue type="object">
       <Database type="ADMIN_MANAGED"  >
           <Instance SID="db1" Node="rac1"  >
           <Instance SID="db2" Node="rac2"  >
       </Database>     </ReturnValue>
[oracle@rac1 sampleXMLs]$

You can see here step by step conversion of database. While processing RCONFIG, it restarts database serveral times. You can see progress on console and you can check details in Source Instance alert.log and Destination Instance alert log of both RAC nodes.

Now , lets check our converted RAC database on RAC1 node.

SQL> select name,open_mode,instance_name from v$database,v$instance;

--------- -------------------- ----------------
TEST	  READ WRITE	       db1

SQL> select * from v$active_instances;

----------- ------------------------------------------------------------
	  1 rac1.localdomain:db1
	  2 rac2.localdomain:db2


Check details on RAC2 node :

SQL> select name,open_mode,instance_name from v$database,v$instance;

--------- -------------------- ----------------
TEST	  READ WRITE	       db2


Stay tuned for More articles on Oracle RAC 

Thank you for giving your valuable time to read the above information.

If you want to be updated with all our articles send us the Invitation or Follow us:

Skant Gupta’s LinkedIn:

Joel Perez’s LinkedIn: Joel Perez’s Profile

Anuradha’s LinkedIn: Anuradha’s Profile

LinkedIn Group: Oracle Cloud DBAAS

Facebook Page: OracleHelp


About The Author

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.