=====Overview===== Migration from single instance to RAC database, can be done in two ways depending if downtime is possible: - Creating Physical Standby database - Restore template with DBCA on another server - Using the RConfig In our case we will use the RConfig tool. So let's get going {{ :singleinstance2rac.jpg?600 |}} =====Prepare the environemnt===== Firstly we can check how the database is configured: [oracle@enode01 ~]$ srvctl config database -db eastdb Database unique name: eastdb Database name: eastdb Oracle home: /u01/app/oracle/product/12.1.0/dbhome_1 Oracle user: oracle Spfile: +DATA/EASTDB/PARAMETERFILE/spfile.299.890151031 Password file: Domain: example.com Start options: open Stop options: immediate Database role: PRIMARY Management policy: AUTOMATIC Server pools: Disk Groups: DATA,FRA Mount point paths: Services: Type: SINGLE <- Single instance Database OSDBA group: dba OSOPER group: oper Database instance: eastdb Configured nodes: enode01 Database is administrator managed [oracle@enode01 ~]$ Be sure to take an offline backup of the single instance database, preferably with RMAN: $ rman target / $ shutdown immediate; $ startup mount; $ backup database; $ alter database open; In case the database has a standby increase archivelog apply gap: [oracle@enode01 ~]$ sqlplus / as sysdba SQL> alter system set archive_lag_target=7200 scope=both; System altered. SQL> exit [oracle@enode01 ~]$ 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: [oracle@enode01 sampleXMLs]$ cp ConvertToRAC_AdminManaged.xml ConvertToRAC_AdminManaged.bkp [oracle@enode01 sampleXMLs]$ [oracle@enode01 sampleXMLs]$ vi ConvertToRAC_AdminManaged.xml <- Modify it to ONLY /u01/app/oracle/product/12.1.0/dbhome_1 <- Modify it to the correct value /u01/app/oracle/product/12.1.0/dbhome_1 <- Modify it to the correct value sys oracle_4U <- Modify it to the correct value sysdba UserDomain\SecureHomeUserName oracle windows_svc --> <- Modify it to the correct value <- Modify it to the correct value eastdb <- Modify it to the correct value <-<- We don't move files so we don't need that parameter <- We don't move files so we don't need that parameter :wq! [oracle@enode01 sampleXMLs]$ ====Test the conversion==== With that, we can test if the conversion will succeed as follows: [oracle@enode01 sampleXMLs]$ rconfig ConvertToRAC_AdminManaged.xml Operation Succeeded There is no return value for this step [oracle@enode01 sampleXMLs]$ After we are sure that the operation will succed we can modify the parameter as follows: [oracle@enode01 sampleXMLs]$ vi ConvertToRAC_AdminManaged.xml :wq! [oracle@enode01 sampleXMLs]$ =====Migration===== Finally, run the migration as follows: [oracle@enode01 sampleXMLs]$ rconfig ConvertToRAC_AdminManaged.xml Converting Database "eastdb" to Cluster Database. Target Oracle Home: /u01/app/oracle/product/12.1.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 Operation Succeeded /u01/app/oracle/product/12.1.0/dbhome_1 /Database> [oracle@enode01 sampleXMLs]$ Once that is done, we can test the database configuration: [oracle@enode01 sampleXMLs]$ srvctl config database -db eastdb Database unique name: eastdb Database name: eastdb Oracle home: /u01/app/oracle/product/12.1.0/dbhome_1 Oracle user: oracle Spfile: +DATA/EASTDB/PARAMETERFILE/spfile.299.890151031 Password file: +DATA/eastdb/orapweastdb Domain: example.com Start options: open Stop options: immediate Database role: PRIMARY Management policy: AUTOMATIC Server pools: Disk Groups: DATA,FRA Mount point paths: Services: Type: RAC <- Changed to RAC Database Start concurrency: Stop concurrency: OSDBA group: dba OSOPER group: oper Database instances: eastdb1,eastdb2 Configured nodes: enode01,enode02 Database is administrator managed [oracle@enode01 sampleXMLs]$