Below are the steps for doing RMAN from RAC to RAC. Steps will be same from NON RAC TO RAC .

For standalone database  – Rman active cloning for standalone 12c database

SOURCE DBRAC NODE- prodb1-host,prodb2-host
DBNAME – PRODB : Oracle 12.1.0.2
INSTANCE NAMES – PRODB1,PRODB2 Oracle 12.1.0.2
TARGET DBRAC NODE – clonedb1-host,clonedb2-host
DBNAME – CLONEDB
INSTANCE NAMES – CLONEDB1,CLONEDB2

 

First we will restore the database to only one node1 and later we will convert to RAC.

All the activities need to be done target database only.

1. Create a static listener on the target host(NODE1)( From ORACLE_HOME)

2. Add tns entry of both source and target db in tnsnames.ora file(TARGET_HOST NODE 1 )

3. Copy the pfile from source db and update the below parameters.

SOURCE PFILE LOOKS LIKE

Now change the db name to CLONEDB and instance names to CLONEDB1,CLONEDB2 in the pfile.
Apart from this, we need to do the few other changes. and save it as initCLONEDB1.ora in $ORACLE_HOME/dbs location.

*.log_archive_dest_1
*.db_create_file_dest
*.db_create_online_log_dest_1=’+REDOA’
*.control_files=’+REDOA’,’+REDOB’,’+DATA’
*.cluster_database=FALSE

Now the target db pfile will look as below.

4. Create password file on source and target db:(password should be same)

Now create password file on source and target db with same sys password.

5. Now start the target database in nomount stage:

startup nomount pfile=initCLONEDB1.ora

6. Test the connectivity to target and auxiliary:[ TARGET HOST]

For big databases it is recommended to create a shell script and run in backuground as below.

7 . Prepare the rman run script:[TARGET HOST]

8. Prepare the shell script.[TARGET HOST]

9. Now run the script with nohup mode:[TARGET DB]

10. Monitor the log

— FEW PART OF THE LOG

Complete log:

Now the database is up and available but only on one node . We need to register the database and convert it into a rac database.

11. Make cluster parameter to true:

12. Create spfile in asm disk

13. Register the database and modify the configuration

14. Now shutdown the database on node 1 and restart using srvctl.

Now RAC database is ready for use.

RESTORE FAILED RMAN ACTIVE CLONE:

While restoring a big database, cloning might fail in the mid due to a network issue. In that case, no need to start from the beginning.
Follow below steps to resume the restore.It will skip the copied files,

1. Shutdown the database
2. Remove the spfile, which rman has created during the duplication
3. Start the database with nomount stage(using the original init file, which you have used , which starting the database initially)
4. Run the same exact rman duplication script.
5. Rman will detect the files which were copied during the previous cloning process and those will be skipped.It will only restore the new datafile which was not copied previously.

It will show warning like below:
Using previous duplicated file +DATA/CLONEDB/DATAFILE/undotbs2.628.936641735 for datafile 78 with checkpoint SCN of 11712137096850. You can ignore.

NOTE :

If the database version is 11g, then use the below rman run block:(step 7 )

 

For any suggestion to this article, Please provide in comment section.