CONNETCT to CDB as a common user and verify this pdb_test is closed
Sql>SelectCon_id,dbid,name,open_mode fromV$pdbs; con_id DBID NAME Open_mode---------- ---------- ------------------------------ ----------2 1258043702pdb$seed READ only3 3749525766PDB1 READ only4 2192587015P4 READ only5 255759235pdb_test READ Writesql>Alter pluggable database pdb_test close; SQL> Alter pluggable database Pdb_test unplug into'/tmp/xmlfile1.xml'; SQL>SelectCon_id,dbid,name,open_mode fromV$pdbs; con_id DBID NAME Open_mode---------- ---------- ------------------------------ ----------2 1258043702pdb$seed READ only3 3749525766PDB1 READ only4 2192587015P4 READ only5 255759235Pdb_test Mounted
A PDB must is dropped from the CDB before it can plugged back into the same CDB
Sql> Create pluggable Database Pdb_testusing '/tmp/xmlfile1.xml'nocopy;create Pluggable Database pdb_testusing '/tmp/xmlfile1.xml'nocopy*ERROR at line1: ORA-65012: Pluggable database pdb_test already exists. SQL>drop pluggable database pdb_test; SQL> Create pluggable Database pdb_testusing '/tmp/xmlfile1.xml'nocopy; SQL>SelectCon_id,dbid,name,open_mode fromV$pdbs; con_id DBID NAME Open_mode---------- ---------- ------------------------------ ----------2 1258043702pdb$seed READ only3 3749525766PDB1 READ only4 2192587015P4 READ only5 255759235pdb_test Mountedsql>Alter pluggable database pdb_test open; SQL>SelectCon_id,dbid,name,open_mode fromV$pdbs; con_id DBID NAME Open_mode---------- ---------- ------------------------------ ----------2 1258043702pdb$seed READ only3 3749525766PDB1 READ only4 2192587015P4 READ only5 255759235pdb_test READ Writesql>
Oracle 12C--Plug unplugged PDB into CDB