Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Clone PDB from RMAN backup

Peasant81May 23 2022 — edited May 25 2022

DB version:19c 
OS : RHEL 7.9 

I have my production pluggable DBs PDB1_P, PDB2_P, PDB3_P running in CDB_01P container DB in the production server.
and 
I have my UAT clones of above PDBs: PDB1_U, PDB2_U, PDB3_U running in CDB_01U container DB in the UAT DB server

Once a month, I want to refresh my UAT PDBs (PDB1_U, PDB2_U, PDB3_U) from PDB1_P, PDB2_P, PDB3_P using RMAN tape backup.

RMAN duplicate is a possible solution. But, this involves 

Step1. Dropping the target UAT DBs (PDB1_U, PDB2_U, PDB3_U)

Step2. Then, in the UAT DB server, run the below RMAN DUPLICATE to an auxiliary DB (say CDB_01X ) .

set UNTIL TIME "TO_DATE('23-MAY-2022 13:45:00', 'DD-MON-YYYY HH24:MI:SS')";
DUPLICATE DATABASE CDB_01P dbid 8469008337 TO CDB_01X pluggable database PDB1_U, PDB2_U, PDB3_U, root
nofilenamecheck ;

Step3. Unplug the PDBs from the auxiliary DB CDB_01X and plugging it to CDB_01U container DB.

Step4. At the ASM layer, I need to move datafiles from CDB_01X sub folder to CDB_01U.

Is there an alternative to the above approach ?

Unfortunately, creating the UAT PDBs via DB Link pointed to production DB (using the below command) is not an option for me.
This is because the production DBs are critical OLTP DBs and the below command can hamper their performance

CREATE PLUGGABLE DATABASE PDB1_U FROM PDB1_P@DB_LINK_POINTING_TO_PROD;
CREATE PLUGGABLE DATABASE PDB2_U FROM PDB2_P@DB_LINK_POINTING_TO_PROD;
CREATE PLUGGABLE DATABASE PDB3_U FROM PDB3_P@DB_LINK_POINTING_TO_PROD;
Comments
Post Details
Added on May 23 2022
6 comments
807 views