Drop Pluggable Database

http://docs.oracle.com/database/121/ADMIN/cdb_plug.htm#ADMIN13658

1.) DROP PDB2

alter session set container=pdb2;

Session altered.

select file_name from dba_data_files;

FILE_NAME
------------------------------------------------------------
/oracle/oradata/CDB/pdb2/system01.dbf
/oracle/oradata/CDB/pdb2/sysaux01.dbf
/oracle/oradata/CDB/pdb2/ts_pdb2_01_01.dbf
+DATA/CDB/28C04D93059F1B02E055000000000001/DATAFILE/ts_asm_pdb2.257.901697877


2.) List PDBs

alter session set container=cdb$root

Session altered.

select con_id, dbid, name, open_mode from v$pdbs;

              CON_ID                 DBID NAME                           OPEN_MODE
-------------------- -------------------- ------------------------------ ----------
                   2           1147477011 PDB$SEED                       READ ONLY
                   3           3291301321 PDB1                           READ WRITE
                   4           3899196999 PDB2                           READ WRITE
                   5           4142533224 PDB3                           READ WRITE
 

 
 
alter pluggable database pdb2 close;
drop pluggable database pdb2 including datafiles;

 select con_id, dbid, name, open_mode from v$pdbs;

              CON_ID                 DBID NAME                           OPEN_MODE
-------------------- -------------------- ------------------------------ ----------
                   2           1147477011 PDB$SEED                       READ ONLY
                   3           3291301321 PDB1                           READ WRITE
                   5           4142533224 PDB3                           READ WRITE

SQL> !ls -ltrh /oracle/oradata/CDB/pdb2/
total 0

ASMCMD> pwd
+DATA/CDB/2D54BCC7D628108FE0530100007F9019/DATAFILE
ASMCMD> ls -l ts_asm_pdb2.257.901697877
ASMCMD-8002: entry 'ts_asm_pdb2.257.901697877' does not exist in directory '+DATA/CDB/2D54BCC7D628108FE0530100007F9019/DATAFILE/'


Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s