← PDB & Multitenant
Oracle · PDB & Multitenant

How to plug in a PDB in Oracle Multitenant

Plug a previously unplugged PDB into a CDB using its XML manifest, with CREATE PLUGGABLE DATABASE ... USING, then check for violations.

Tested on12c18c19c21c23ai26ai

Plug a previously unplugged PDB into this CDB using its XML manifest. Run from the root.

Check compatibility first (DBMS_PDB.CHECK_PLUG_COMPATIBILITY) and resolve any plug-in violations after opening. Adjust the file handling (COPY / MOVE / NOCOPY) to your storage.

CREATE PLUGGABLE DATABASE &&pdb_name
  USING '/u01/app/oracle/oradata/&pdb_name/manifest.xml'
  COPY
  FILE_NAME_CONVERT = ('/old/path/',
                       '/u01/app/oracle/oradata/CDB/&pdb_name/');

ALTER PLUGGABLE DATABASE &pdb_name OPEN READ WRITE;

-- Check for violations, then verify
SELECT name, cause, message
FROM   pdb_plug_in_violations
WHERE  name = UPPER('&pdb_name');

SELECT name, open_mode FROM v$pdbs WHERE name = UPPER('&pdb_name');
PDBMultitenantPlug