Dropping an Application Container
You can drop an application container when you want to move the application container from one CDB to another or when you no longer need the application container.
Dropping an application container is very similar to dropping a PDB. When you drop an application container, the control file of the CDB is modified to eliminate all references to the dropped application container. Archived redo log files and backups associated with the application container are not removed, but you can use Oracle Recovery Manager (RMAN) to remove them.
When dropping an application container, you can either keep or delete the application container’s data files by using one of the following clauses in the DROP PLUGGABLE DATABASE statement:
-
KEEP DATAFILES, the default, retains the data files.The application container’s temp file is removed even when
KEEP DATAFILESis specified because the temp file is no longer needed. -
INCLUDING DATAFILESremoves the data files from disk.If an application container was created with the
SNAPSHOT COPYclause, then you must specifyINCLUDING DATAFILESwhen you drop the application container.
The following prerequisites must be met:
-
The application container must be in mounted mode, or it must be unplugged.
-
The current user must have
SYSDBAorSYSOPERadministrative privilege, and the privilege must be either commonly granted or locally granted in the application container. The user must exercise the privilege usingAS SYSDBAorAS SYSOPERat connect time. -
The application container must not have any application PDBs plugged into it.
-
The application container must not have an application seed plugged into it.
Note:
This operation is destructive.
To drop an application container:
-
In SQL*Plus, ensure that the current container is the CDB root.
See "About the Current Container" and "Accessing a Container in a CDB with SQL*Plus".
-
Run the
DROPPLUGGABLEDATABASEstatement and specify the application container to drop.
Example 14-6 Dropping Application Container salesact While Keeping Its Data Files
DROP PLUGGABLE DATABASE salesact
KEEP DATAFILES;
Example 14-7 Dropping Application Container salesact and Its Data Files
DROP PLUGGABLE DATABASE saleact
INCLUDING DATAFILES;
See Also:
Parent topic: Creating and Removing Application Containers and Seeds