Convert 12cR1 non-RAC database to RAC database using rconfig

Monday, May 19, 2014

I have recently configured Active/Passive Failover cluster using Grid Infrastructure 12cR1 and wrote document on that subject. Now I plan to use this environment and convert "test12" database from Single-Instance to RAC database.

There are several ways to convert non-RAC database to RAC database:
- using Database Configuration Assistant (DBCA)
- Oracle Enterprise Manager
- rconfig command line utility
- manually

In this post I will describe how to perform conversion using rconfig utility.

Before you convert single-instance database to RAC ensure that your environment meets prerequisites like:
- Oracle Clusterware is up and running
- shared storage (ASM,CFS)
- user equivalence
- Oracle 12cR1 software installed

I will skip preparation part in this post. You can find steps on how to prepare nodes for Oracle RAC in the first part of the document

Rconfig uses customized xml template to convert single-instance database to RAC.

1. As orcl12 user (db owner) navigate to directory "$ORACLE_HOME/assistants/rconfig/sampleXMLs" where you can find two templates ConvertToRAC_AdminManaged.xml and ConvertToRAC_PolicyManaged.xml.

For this example I will edit ConvertToRAC_AdminManaged.xml and add custom entries.

$ cd $ORACLE_HOME/assistants/rconfig/sampleXMLs
$ cp ConvertToRAC_AdminManaged.xml ConvToRac.xml
$ vi ConvToRac.xml

My xml template: ConvToRac.xml

1. Convert verify - when YES rconfig performs checks to ensure that all prerequisites are met for conversion to Oracle RAC.
2. SourceDBHome - Oracle Home of single-instance database.
3. TargetDBHome - Oracle Home where rac database should be configured.
4. SourceDBInfo SID - SID of single-instance database.
5. User, Password, Role - credentials for user with sysdba role are required.
6. Node name - specify nodes for RAC instances.
7. InstancePrefix - enter instance prefix tag or leave this parameter empty.
8. SharedStorage type - type of shared storage.
9. TargetDatabaseArea - database area location for RAC database.
10. TargetFlashRecoveryArea - fast recovery area location for RAC database.

Backup database in case you decide to perform conversion on production database.

Run rconfig to perform conversion based on template:

$ rconfig ConvToRac.xml

<?xml version="1.0" ?>
<RConfig version="1.1" >
        <Result code="1" >
          Got Exception
             Cannot determine if cdb or not
Operation Failed. Refer logs at
for more details.


Operation failed with error - "Cannot determine if cdb or not" because my single-instance database was down.

Startup database and run rconfig again:
(you can track progress in $ORACLE_BASE/cfgtoollogs/rconfig/rconfig*.log)

$ rconfig ConvToRac.xml

Converting Database "test12" to Cluster Database. Target Oracle Home: /u01/app/orcl12/product/12.1.0/dbhome_1. Database Role: PRIMARY.
Setting Data Files and Control Files
Adding Trace files
Adding Database Instances
Adding Redo Logs
Enabling threads for all Database Instances
Setting TEMP tablespace
Adding UNDO tablespaces
Setting Fast Recovery Area
Updating Oratab
Creating Password file(s)
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="test121" Node="cluster1"  >
           <Instance SID="test122" Node="cluster2"  >
       </Database>     </ReturnValue>

Operation succeeded!

$ srvctl status database -d test12
Instance test121 is running on node cluster1
Instance test122 is running on node cluster2

$ srvctl config database -d test12
Database unique name: test12
Database name: test12
Oracle home: /u01/app/orcl12/product/12.1.0/dbhome_1
Oracle user: orcl12
Spfile: +DATA/spfiletest12.ora
Password file: +DATA/orapwtest12
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: test12
Database instances: test121,test122
Disk Groups: DATA,FRA
Mount point paths:
Type: RAC
Start concurrency:
Stop concurrency:
Database is administrator managed

$ sqlplus system@test12

SQL*Plus: Release Production on Mon May 19 13:31:34 2014

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

Enter password:
Last Successful login time: Mon May 19 2014 13:30:41 +02:00

Connected to:
Oracle Database 12c Enterprise Edition Release - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP
and Advanced Analytics options

SQL> select instance_number, instance_name from v$instance;

--------------- ----------------
              1 test121

If conversion fails then use following steps to recover and reattempt conversion:
- review conversion log and fix problems that caused conversion to fail
- delete database using DBCA
- restore source database
- reattempt the conversion




Post a Comment