Unplug a Pluggable Database (PDB)

Unplug a Pluggable Database (PDB) Manually

Before attempting to unplug a PDB, you must make sure it is closed.

To unplug the database use the ALTER PLUGGABLE DATABASE command with the UNPLUG INTO clause to specify the location of the XML metadata file.

SQL>ALTER PLUGGABLE DATABASE pdb2 CLOSE;

SQL>ALTER PLUGGABLE DATABASE pdb2 UNPLUG INTO '/u01/app/oracle/oradata/cdb1/pdb2/pdb2.xml';

The pluggable database is still present, but you shouldn't open it until the metadata file
 and all the datafiles are copied somewhere safe.

SQL>SELECT name, open_mode
FROM   v$pdbs
ORDER BY name;

NAME       OPEN_MODE
------------------------------ ----------
PDB$SEED       READ ONLY
PDB1       MOUNTED
PDB2       MOUNTED
PDB3       READ WRITE


You can delete the PDB, choosing to keep the files on the file system.

SQL> DROP PLUGGABLE DATABASE pdb2 KEEP DATAFILES;

SELECT name, open_mode
FROM   v$pdbs
ORDER BY name;

NAME       OPEN_MODE
------------------------------ ----------
PDB$SEED       READ ONLY
PDB1       MOUNTED
PDB3       READ WRITE

No comments:

ORA-00059: Maximum Number Of DB_FILES Exceeded in 19C database

When I am adding datafile to my 19C database facing the below error. SQL> alter tablespace DATA  add datafile '/u01/data/data15.dbf&#...