Pluggable Database drop, Drop Pluggable Database (PDB) in Oracle, Remove Pluggable Database

Pluggable Database drop, Drop Pluggable Database (PDB) in Oracle, Remove Pluggable Database

Hera we are going to drop the Pluggable Database (PDB) in the container database.

When we drop a PDB, the control file of the multitenant container database (CDB) is modified to remove all references to the dropped PDB and its data files. Archived logs and backups associated with the dropped PDB are not deleted. We can delete them using Oracle Recovery Manager (RMAN).

When we are going to drop pluggable database, we have two option including datafiles and keep datafiles with 'DROP pluggable database <PDB_NAME>' command.

By default oracle drops pluggable database with keeping datafiles.

[ i. e 'DROP pluggable database <PDB_NAME>'  and  'DROP pluggable database <PDB_NAME> keep datafiles'  are same ]

Here we are going to drop pluggable database RFINUAT.


Here the above RFINUAT database exists and running in READ WRITE mode. To drop the RFINUAT database we have need to close it.


Close the database using ‘alter pluggable database RFINUAT close;’ command before dropping database and check the status.

 

When we try to drop the READ WRITE mode (open state) pluggable database using including datafiles, It will throw below error and not perform the drop activity.


 

Close the database that is to be dropped using the ‘alter pluggable database RFINUAT close;’ command, and then run ‘drop pluggable database RFINUAT including datafiles;’ command. It will drop the RFINUAT  database along with datafiles.


Here the RFINUAT database has been successfully dropped. We check and find that it doesn't exist.

  

Some more articles you might also be interested in :-

   Pluggable Database in Details

   Clone a Pluggable Database

   Drop a Pluggable Database

 

 

Comments

Popular posts from this blog

Remove ACL and privileges, Drop ACL in oracle

ORA-02050: transaction rolled back, some remote DBs may be in-doubt

Distributed transaction, Oracle Distributed Transactions, distributed transaction in oracle