Delete Multitenant Instance and Pluggable Database

Quick Tip

If you want to delete a pluggable database or a multitenant instance you need to do the following commands:

Delete Pluggable Database

First you have to close the pluggable database and then drop it including the physical datafiles:

[oracle@patoracle ~]$ sqlplus / as sysdba

Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0

SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 TALLER                         READ WRITE NO

SQL> ALTER PLUGGABLE DATABASE taller CLOSE IMMEDIATE;

Pluggable database altered.

SQL> DROP PLUGGABLE DATABASE taller INCLUDING DATAFILES;

Pluggable database dropped.

SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
Delete Multitenant Instance

To remove the multitenant instance you need to use dbca:

[oracle@patoracle ~]$ dbca -silent -deleteDatabase -sourceDB patodb -sysDBAUserName sys -sysDBAPassword ********

[WARNING] [DBT-19202] The Database Configuration Assistant will delete the Oracle instances and datafiles for your database. All information in the database will be destroyed.
Prepare for db operation
32% complete
Connecting to database
35% complete
39% complete
42% complete
45% complete
48% complete
52% complete
65% complete
Updating network configuration files
68% complete
Deleting instance and datafiles
84% complete
100% complete
Database deletion completed.
Look at the log file "/opt/oracle/cfgtoollogs/dbca/patodb/patodb0.log" for further details.
[oracle@patoracle ~]$