This is an old revision of the document!


Migration from single instance to RAC database, can be done in two ways depending if downtime is possible:

  1. Creating Physical Standby database
  2. Restore template with DBCA on another server
  3. Using the RConfig

In our case we will use the RConfig tool. So let's get going

First, be sure to take an offline backup of the single instance database, preferably with RMAN:

Create offlien backup

$ rman target /
$ shutdown immediate;
$ startup mount;
$ backup database;
$ alter database open;
</Code<

In case the database has a standby increase archivelog apply gap:

<Code:bash|Increase archivelog gap>
[oracle@enode01 ~]$ sqlplus / as sysdba
SQL> alter system set archive_lag_target=7200 scope=both; 
System altered. 
SQL> exit
[oracle@enode01 ~]$
<Code>

After that, let's modify the template so we can test if everything is set up correctly.
Bare in mind that a configured clusterware should be available on both servers with ASM.

{{ :singleinstance2rac.jpg?400 |}}

First locate the "ConvertToRAC_AdminManaged.xml" in the $ORACLE_HOME/assistants/rconfig/sampleXMLs and copy it:

<Code:bash|Modify the template>
[oracle@enode01 sampleXMLs]$ cp ConvertToRAC_AdminManaged.xml 
ConvertToRAC_AdminManaged.bkp 
[oracle@enode01 sampleXMLs]$
[oracle@enode01 sampleXMLs]$ vi ConvertToRAC_AdminManaged.xml
<?xml version="1.0" encoding="UTF-8"?> 
<n:RConfig xmlns:n="http://www.oracle.com/rconfig" 
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
 xsi:schemaLocation="http://www.oracle.com/rconfig rconfig.xsd"> 
 <n:ConvertToRAC> 
<!-- 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="ONLY">                                                             <- Modify it to ONLY
<!--Specify current OracleHome of non-rac database for SourceDBHome --> 
 
<n:SourceDBHome>/u01/app/oracle/product/12.1.0/dbhome_1</n:SourceDBHome>               <- Modify it to the correct value
<!--Specify OracleHome where the rac database should be configured. It can be 
same as SourceDBHome --> 
 
<n:TargetDBHome>/u01/app/oracle/product/12.1.0/dbhome_1</n:TargetDBHome>               <- Modify it to the correct value
<!--Specify SID of non-rac database and credential. User with sysdba role is 
required to perform conversion --> 
 <n:SourceDBInfo SID="eastdb"> 
 <n:Credentials> 
 <n:User>sys</n:User> 
 <n:Password>oracle_4U</n:Password>                                                    <- Modify it to the correct value
 <n:Role>sysdba</n:Role> 
 </n:Credentials> 
<!--Specify Windows Secure Oracle Home Credentials if the Oracle Home was 
installed with Secure User option -->
 <n:Credentials> 
 <n:User>UserDomain\SecureHomeUserName</n:User> 
 <n:Password>oracle</n:Password> 
 <n:Role>windows_svc</n:Role> 
 </n:Credentials> 
--> 
 </n:SourceDBInfo> 
<!--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:NodeList> 
 <n:Node name="enode01"/>                                                    <- Modify it to the correct value
 <n:Node name="enode02"/>                                                    <- Modify it to the correct value
 </n:NodeList> 
<!--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.--> 
 <n:InstancePrefix>eastdb</n:InstancePrefix>                                  <- Modify it to the correct value
<!-- 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. --> 
 <n:TargetDatabaseArea></n:TargetDatabaseArea>                                <-<- We don't move files so we don't need that parameter
<!--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. --> 
 
 <n:TargetFlashRecoveryArea></n:TargetFlashRecoveryArea>                        <- We don't move files so we don't need that parameter
 </n:SharedStorage> 
 </n:Convert> 
 </n:ConvertToRAC> 
</n:RConfig> 
:wq! 
[oracle@enode01 sampleXMLs]$
  • oracle_rac_database_migration_to_rac.1603033607.txt.gz
  • Last modified: 2020/10/18 15:06
  • by andonovj