Monday, September 16, 2013

Oracle Database 12c - Unplug PDB

How to Unplug the pluggable database

PDB must be closed before unplug the corresponding PDB.

SQL> alter pluggable database dx12p1 unplug into '/oracle/app/oracle/product/12.1.0/my_pdb/DX12P1.xml';
alter pluggable database dx12p1 unplug into '/oracle/app/oracle/product/12.1.0/my_pdb/DX12P1.xml'
*
ERROR at line 1:
ORA-65025: Pluggable database DX12P1 is not closed on all instances.

SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         4 DX12P1                          READ WRITE NO

SQL> alter pluggable database dx12p1 close;

Pluggable database altered.

SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         4 DX12P1                         MOUNTED

SQL> alter pluggable database dx12p1 unplug into '/oracle/app/oracle/product/12.1.0/my_pdb/DX12P1.xml';

Pluggable database altered.

Unplugged database can not be opened again.

SQL> alter pluggable database dx12p1 open;
alter pluggable database dx12p1 open
*
ERROR at line 1:
ORA-65086: cannot open/close the pluggable database

1 comment:

  1. Thanks for sharing this blog. The content is beneficial and useful. Very informative post. Visit here to learn more about Data Warehousing companies and Data analytics Companies. I am impressed by the information that you have on this blog. Thanks once more for all the details.Visit here for Top Big Data Companies.

    ReplyDelete