Cloning Pluggable Databases (PDB).

Clone a Pluggable Database (PDB) Manually

Cloning an existing local PDB is like creating a new PDB from the seed PDB,

except now we are using non-seed PDB as the source, which we must identify using the FROM clause.

 Make sure the source PDB is open in READ ONLY mode.

Setting the source to read-only is not necessary for Oracle 12cR2.

SQL> ALTER PLUGGABLE DATABASE pdb3 CLOSE;
SQL> ALTER PLUGGABLE DATABASE pdb3 OPEN READ ONLY;

SQL> CREATE PLUGGABLE DATABASE pdb4 FROM pdb3
  FILE_NAME_CONVERT=('/u01/app/oracle/oradata/cdb1/pdb3/','/u01/app/oracle/oradata/cdb1/pdb4/');

SQL> ALTER PLUGGABLE DATABASE pdb4 OPEN READ WRITE;


Switch the source PDB back to read/write if you made it read-only.

SQL> ALTER PLUGGABLE DATABASE pdb3 CLOSE;
SQL> ALTER PLUGGABLE DATABASE pdb3 OPEN READ WRITE;

The cloning syntax also allows for cloning from remote databases using a database link in the local CBD.


There are a few restrictions associated with this functionality.

No comments:

ERROR 1396 (HY000): Operation ALTER USER failed for 'Mysql'@'%'

 This MySQL error — ERROR 1396 (HY000): Operation ALTER USER failed for 'Mysql'@'%' — means that MySQL cannot find the user ...