Cloning PDB within same Oracle Container Based Database 12cR1….

1.. Create a new directory like clone to clone PDBs from existing PDBs

mkdir -p /u001/oracle/oradata/CDB2/clone

200.png

2.. Now connect with sysdba user and verify Container Database you want to connect and status of PDBs that you want to clone . PDB that you want to clone should be closed and in read only mode.

201.png

3..  Shut down pluggable database if open and open in read only mode

202.png

203.png

4..  Now change Oracle Managed File db_create_file_dest to /u001/oracle/oradata/CDB2/clone. So that Oracle will create data file in this location while cloning.

204.png

4.1 As DB_CREATE_FILE_DEST parameters is dynamic and can be changed using the ALTER SYSTEM command.

205.png

If you do not want to use OMF or DB_CREATE_FILE_DEST then

create pluggable database CBD2PDB3 from CBD2PDB1 FILE_NAME_CONVERT=(‘/u001/oracle/oradata/CDBPDB2′,’/u001/oracle/oradata/CDB2/clone2’);

206.png

5..  Now execute Clone CBD2PDB2 from CBD2PDB1

207.png

6.. Check status of newly cloned PDBs and open the cloned PDBs

208.png

209.png

210.png

7.. Once PDB is cloned you can try with shutdown and open both the PDBs

211.png

8.. Now both the PDBs are opened

212.png

9.. Clone PDB will have data file like given below

220.png

Happy Learning !!!!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s