Cloning from a RAC database to standalone database, can be done either using ACTIVE CLONE or by taking  a RMAN backup from RAC database and restoring in standalone database.

SEE ALSORMAN ACTIVE CLONING

Here in this article,we will show db cloning by taking RMAN backup manually( If backup is already available on source, then it can be used)

NOTE – This cloning activity has been done on 12c , So we can run sql queries on RMAN prompt also

1. Take RMAN BACKUP OF THE SOURCE RAC DB :

2. scp the files to target host( where we will build standalone)

3. Create a new init file on target server:

Make sure the two add these two below parameters if the directory structure is different in target host.
*.db_file_name_convert (< SOURCE DB DATAFILE LOCATION > , < TARGET DB_FILE LOCATION >)
*.log_file_name_convert( < SOURCE REDO LOG LOCATION > , < TARGET REDO LOG LOCATION > )

4. Start database in nomount stage:

5. Restore the controlfile from the backup set:

6. Start the database in mount stage:

7. Catalog the backup sets which copied

8. Now prepare the rman restore script.
First get the datafile details from source(RAC DB)

Rman block will be as below

Below is the output log:

You can the ignore the error printed in the end.

9. Now open the database in resetlogs:

It failed with , as it dont recognize the redologs. Because in controlfile, the redolog location is that of source .
So we need to rename the redologs as per the target host db.

Tried to open again, but got a new error

We can see the status of group 7 and grup 9 are in clearing_current MODE. So we clear them manually.

10.Open in resetlog now:

11. Clear the thread 2 log members.

As we have clone from a 2 node RAC, so it has also 2 threads. Drop the thread 2 log.

12. drop the undo tablespace of other instance:

If you are gettting ORA-38856: cannot mark instance error while doing open resetlog, Then use the below hidden parameter

SQL> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-38856: cannot mark instance UNNAMED_INSTANCE_2 (redo thread 2) as enabled

SQL> alter system set “_no_recovery_through_resetlogs”=TRUE scope=both;

System altered.