<<Back to DB Administration Main Page
How to Clone an Oracle Pluggable Database (PDB) with in the Same Container
Step1> Bring the Source PDB in Read Only ModeSQL> alter session set container=TEST;
Session altered.
SQL> alter pluggable database close immediate;
Pluggable database altered.
SQL> alter pluggable database open read only;
Pluggable database altered.
SQL> select con_id,name,open_mode,restricted from v$pdbs;
CON_ID NAME OPEN_MODE RESTRICTE
---------- ---------- ------------------------------ ---------
20 TEST READ ONLY NO
Step2> Clone the Source PDB
SQL> create pluggable database TEST_CLON from TEST ;
Pluggable database created.
SQL> select PDB_NAME,STATUS from cdb_pdbs;
PDB_NAME STATUS
-------------------- ---------------------------
PDB$SEED NORMAL
TEST NORMAL
TEST_CLON NEW
Step3> Open the Clone PDB
SQL> alter pluggable database TEST_CLON open;
Pluggable database altered.
Step4> Verify the Status of Clone PDB
SQL> select con_id,name,open_mode,restricted from v$pdbs;
Step5> Bring Back the Source PDB in Read Write Mode again
SQL> Alter pluggable database TEST close immediate;
SQL> Alter pluggable database TEST open;
Comments
Post a Comment