Unplugging an Application Seed from an Application Container

You can unplug an application seed from an application container.

About Unplugging an Application Seed

Unplugging an application seed disassociates the application seed from an application container. You unplug an application seed when you no longer want the application seed to be available.

Unplugging an application seed is similar to unplugging a PDB. To unplug an application seed, connect to its application 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 seed 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 it in as a PDB or an application PDB. When you specify a .pdb file, it contains a compressed archive of the XML file that describes the application seed and the files used by the application seed (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 in as a PDB or an application PDB.

Before it can be unplugged, the application seed must be closed. When you unplug an application seed, the unplugged application seed is in mounted mode. The unplug operation makes some changes in the application seed’s data files to record, for example, that the application seed was successfully unplugged. Because it is still part of the application container, the unplugged application seed is included in an RMAN backup of the entire CDB. Such a backup provides a convenient way to archive the unplugged application seed in case it is needed in the future.

To completely remove the application seed from the application container, you can drop it. The only operation supported on an unplugged application seed is dropping the application seed. The application seed must be dropped from the application container before it can be plugged back into the same application container. An application seed is usable only when it is plugged into an application container.

See Also:

Unplugging an Application Seed

To unplug an application seed, run the ALTER PLUGGABLE DATABASE ... UNPLUG INTO statement.

Prerequisites

The following prerequisites must be met:

  • The current user must have SYSDBA or SYSOPER administrative privilege, and the privilege must be either commonly granted or locally granted in the application container. The user must exercise the privilege using AS SYSDBA or AS SYSOPER at connect time.

  • The application seed must have been opened at least once.

Note:

If you are unplugging an application seed that includes data that was encrypted with Transparent Data Encryption, then follow the instructions in Oracle Database Advanced Security Guide.

To unplug an application seed:

  1. In SQL*Plus, ensure that the current container is the application root of the application container to which the application seed belongs.

  2. Close the application seed.

    In an Oracle Real Application Clusters (Oracle RAC) environment, the application seed must be closed on all instances.

  3. Run the ALTER PLUGGABLE DATABASE statement with the UNPLUG INTO clause, and specify the application seed to unplug and the name and location of the application seed’s XML metadata file or .pdb file.

Example 14-11 Unplugging Application Seed salesact$SEED

This ALTER PLUGGABLE DATABASE statement unplugs the application seed salesact$SEED and creates the salesact$SEED.xml metadata file in the /oracle/data/ directory:

ALTER PLUGGABLE DATABASE salesact$SEED 
  UNPLUG INTO '/oracle/data/saleact$SEED.xml';