Unplugging an Application Container from a CDB
You can unplug an application container from a CDB.
- About Unplugging an Application Container
Unplugging an application container disassociates the application container from a CDB. - Unplugging an Application Container
Unplug an application container by using anALTER PLUGGABLE DATABASE ... UNPLUG INTO
statement.
Parent topic: Creating and Removing Application Containers and Seeds
About Unplugging an Application Container
Unplugging an application container disassociates the application container from a CDB.
Typically, you unplug an application container when you want to move the application container to a different CDB. Also, you can unplug the application container when you no longer want it to be available.
Unplugging an application container is similar to unplugging a PDB. To unplug an application container, connect to its CDB root and use the ALTER PLUGGABLE DATABASE
statement to specify an XML file or a .pdb
file. When you specify an XML file (.xml
extension), it will contain metadata about the application container after it is unplugged. The SQL statement creates the XML file, and it contains the required information to enable a CREATE PLUGGABLE DATABASE
statement on a target CDB to plug in the application container. When you specify a .pdb
file, it contains a compressed archive of the XML file that describes the application container and the files used by the application container (such as the data files and wallet file). A .pdb
file enables you to copy a single, compressed file (instead of multiple files) to a new location to plug the application container into a CDB.
Before it can be unplugged, the application container must not have any application PDBs plugged into it, and it must be closed. When you unplug an application container, the unplugged application container is in mounted mode. The unplug operation makes some changes in the application container’s data files to record, for example, that the application container was successfully unplugged. Because it is still part of the CDB, the unplugged application container is included in an RMAN backup of the entire CDB. Such a backup provides a convenient way to archive the unplugged application container in case it is needed in the future.
To completely remove the application container from the CDB, you can drop it. The only operation supported on an unplugged application container is dropping the application container. The application container must be dropped from the CDB before it can be plugged back into the same CDB. An application container is usable only when it is plugged into a CDB.
See Also:
-
"Modifying the Open Mode of PDBs" for information about closing a PDB
-
"Modifying a PDB at the System Level" for information about initialization parameters and unplugged PDBs
-
Oracle Database Security Guide for information about common users and local users
Parent topic: Unplugging an Application Container from a CDB
Unplugging an Application Container
Unplug an application container by using an ALTER PLUGGABLE DATABASE ... UNPLUG INTO
statement.
Prerequisites
You must meet the following prerequisites:
-
The current user must have
SYSDBA
orSYSOPER
administrative privilege, and the privilege must be either commonly granted or locally granted in the PDB. The user must exercise the privilege usingAS
SYSDBA
orAS
SYSOPER
at connect time. -
The application container must have been opened at least once.
-
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:
If you are unplugging an application container that includes data that was encrypted with Transparent Data Encryption, then follow the instructions in Oracle Database Advanced Security Guide.
To unplug an application container:
-
In SQL*Plus, ensure that the current container is the root of the CDB.
-
Close the application container.
In an Oracle Real Application Clusters (Oracle RAC) environment, the application container must be closed on all instances.
-
Run the
ALTER PLUGGABLE DATABASE
statement with theUNPLUG INTO
clause, and specify the application container to unplug and the name and location of the application container’s XML metadata file or .pdb file.
Example 14-5 Unplugging Application Container salesact
This ALTER PLUGGABLE DATABASE
statement unplugs the application container salesact
and creates the salesact.xml
metadata file in the /oracle/data/ directory
:
ALTER PLUGGABLE DATABASE salesact UNPLUG INTO '/oracle/data/saleact.xml';
Parent topic: Unplugging an Application Container from a CDB