Misc Other Multitenant Management Commands

Cloning from NonCDB to CDB
NonCDB must support multitenant and use dblink on NONCDB to connect
DBLink user must have CREATE SESSION and CREATE PLUGGABLE DATABASE privileges
CREATE PLUGGABLE DATABASE <new_pdb> FROM NON$CDB@<dblink>

       FILE_NAME_CONVERT=('</source datafile path/>,'</target datafile path/>');

@ORACLE_HOME/rdbms/admin/noncdb_to_pdb.sql

ALTER PLUGGABLE DATABASE <target pdb> OPEN;


Moving a PDB
CREATE PLUGGABLE DATABASE <new pdb> FROM <old pdb>@<dblink> RELOCATE;

ALTER PLUGGABLE DATABASE <new pdb> OPEN;


Removing a PDB
ALTER PLUGGABLE DATABASE <name> CLOSE;

DROP PLUGGABLE DATABASE <name> INCLUDING DATAFILES;


Exporting/Unplugging a pdb to a single compressed file
ALTER PLUGGABLE DATABASE <pdb_name> UNPLUG INTO '</path/><filename>.pdb';


Importing/Plugging in a pdb from a single compressed file
CREATE PLUGGABLE DATABASE <new pdb name> USING '</path/><filename>.pdb';
Note that compressed pdb files for export and import are suffixed by .pdb and are a zip fle format.
Comments