REMOVE PLUGGABLE DATABASE

This command stops recovery at a target PDB and then drops the target PDB. Dropping the target PDB ends data protection for the source PDB in a DG PDB environment.

Format

REMOVE PLUGGABLE DATABASE pdb-name AT database-name [REMOVE DATAFILES];

Parameters

Parameter Description
pdb-name Name of the target PDB that must be removed from target database.
database-name Name of the target database that contains the specified target PDB.
REMOVE DATAFILES This optional parameter removes the PDB configuration. This removes the PDB from its target role that was created with ADD PLUGGABLE DATAFILE.

Usage Notes

  • The specified target PDB must have been configured using the ADD PLUGGABLE DATABASE command.

Examples

Example 10-8 Remove target PDB

This example removes the target PDB named dgpdb_sales from the target database cdb_newyork. This stops the recovery process at the target PDB and removes it from the target database.

DGMGRL> REMOVE PLUGGABLE DATABASE dgpdb_sales AT cdb_newyork;
Removed.

Example 10-9 Remove the datafiles associated

When PDB-level Data Guard protection is no longer required, you can remove the DG PDB configuration. The REMOVE PLUGGABLE DATABASE command removes a PDB in the target role that was created using the ADD PLUGGABLE DATABASE command. This command stops the recovery process and removes the pluggable database from the configuration. The associated source PDB is then no longer protected.

For this example, the optional REMOVE DATAFILES clause is included to also delete the PDB datafiles when the PDB nyc_sales is removed from the target CDB newyork.

DGMGRL> REMOVE PLUGGABLE DATABASE nyc_sales AT newyork REMOVE DATAFILES; 
Pluggable Database 'nyc_sales' removed. 

DGMGRL> SHOW ALL PLUGGABLE DATABASE AT newyork; 
No pluggable databases at database 'newyork'