Before unplugging lets check the Container databases status.
SQL> show con_name
CON_NAME
------------------------------
CDB$ROOT
SQL> select NAME,CON_NAME,CON_ID from v$active_services;
NAME CON_NAME CON_ID
-------------------- ------------------------------ ----------
pdbtest.oracle.com PDBTEST 4
pdborcl.oracle.com PDBORCL 3
cdb12cXDB CDB$ROOT 1
cdb12c.oracle.com CDB$ROOT 1
SYS$BACKGROUND CDB$ROOT 1
SYS$USERS CDB$ROOT 1
SQL> select CON_ID,NAME,OPEN_MODE from v$pdbs;
CON_ID NAME OPEN_MODE
---------- -------------------- ----------
2 PDB$SEED READ ONLY
3 PDBORCL READ WRITE
4 PDBTEST READ WRITE
SQL> conn /as sysdba
Connected.
SQL> alter pluggable database pdborcl close immediate;
Pluggable database altered.
SQL> alter pluggable database pdborcl unplug into '/u01/app/oracle/oradata/cdb12c/pdborcl/pdborcl.xml';
Pluggable database altered.
SQL> drop pluggable database pdborcl keep datafiles;
Pluggable database dropped.
SQL> select CON_ID,NAME,OPEN_MODE from v$pdbs;
CON_ID NAME OPEN_MODE
---------- -------------------- ----------
2 PDB$SEED READ ONLY
4 PDBTEST READ WRITE
SQL> select pdb_name, status from cdb_pdbs;
PDB_NAME STATUS
--------------- -------------
PDB$SEED NORMAL
PDBTEST NORMAL
SQL> select NAME,CON_NAME,CON_ID from v$active_services;
NAME CON_NAME CON_ID
-------------------- ------------------------------ ----------
pdbtest.oracle.com PDBTEST 4
cdb12cXDB CDB$ROOT 1
cdb12c.oracle.com CDB$ROOT 1
SYS$BACKGROUND CDB$ROOT 1
SYS$USERS CDB$ROOT 1
Hope this help.
No comments:
Post a Comment