Unplugging a pdbunplugging a PDB is not equal to remove a pdbunplugging a PDB creates a corresponding XML file that can be added to the other cdbpdb after being unplugging by the XML file. It is also shown in V$containers, except that the state creates a directory for mounted, which is used to create the corresponding XML file when unplugging the PDB $mkdir-p/u12/app/oracle/unplug/unplugdb$ Sqlplus '/as sysdba ' sql*plus:release 12.1.0.1.0 Production on Tue June 14:19:54 2015Copyright (c) 1982, Oracle. All rights reserved. Connected to:oracle Database 12c Enterprise Edition Release 12.1.0.1.0-64bit productionwith The partitioning, OLAP, Adva nced Analytics and Real application testing optionssql> show Con_name; Con_name------------------------------cdb$rootsql> Select con_id,name,open_mode,restricted from V$pdbs order by 1; con_id NAME open_mode RES-----------------------------------------------------2 PDB $SEED Read Only no. 3 YB READ only No 4 YB1 Mounted 5 clonedb READ WRITE NOSQl> alter session set CONTAINER=CLONEDB; Session altered. sql> shutdown immediate; Pluggable Database closed. Sql> conn/as sysdbaconnected.sql> show Con_name; Con_name------------------------------cdb$rootsql> Select con_id,name,open_mode,restricted from V$pdbs order by 1; con_id NAME open_mode RES-----------------------------------------------------2 PDB $SEED Read Only no. 3 YB READ only No 4 YB1 Mounted 5 clonedb mountedsql> alter pluggable database Clonedb unplug in To '/u12/app/oracle/unplug/unplugdb/unplugdb.xml '; Pluggable database altered. Sql> Select con_id,name,open_mode,restricted from V$pdbs order by 1; con_id NAME open_mode RES-----------------------------------------------------2 PDB $SEED READ only NO 3 YB READ only NO 4 YB1 mounted 5 clonedb mounted Sql> Select Name,open_mode,total_size from V$pdbs;name open_mode total_size----------------- ---------------------------------Pdb$seed Read Only 283115520YB read Only 393216000YB1 mounted 0CLONEDB mounted 0S Ql> select Pdb_name,status from Dba_pdbs; Pdb_name STATUS---------------------------------------------------------------Y B Normalpdb$seed NORMALYB1 Normalclonedb Unplugged If you want to reuse the PDB, you need to first The PDB is deleted and then re-plug into the CDB sql> drop pluggable database clonedb; Pluggable database dropped. Sql> Select PDb_name,status from Dba_pdbs; Pdb_name STATUS---------------------------------------------------------------Y B Normalpdb$seed NORMALYB1 Normalsql>
Unplugging a PDB