Database Reference
In-Depth Information
Unplugging and Dropping a PDB
In this section we'll discuss the primary methods for unplugging and dropping a PDB, using
the DBCA and SQL*Plus. But first we need to explain the difference between unplugging a
PDB and dropping a PDB. Unplugging a PDB removes the associations between a PDB and its
host CDB. Unplug a PDB when you want to make it unavailable or move it to another CDB.
Unplugging removes the PDB from the CDB but retains the data files and metadata. When
you unplug a PDB you can easily plug it back into the CDB or into another CDB.
Dropping or deleting a PDB completely removes the PDB from the CDB. The DROP
PLUGGABLE DATABASE statement drops a PDB and modifies the control file of the CDB to
eliminate all references to the PDB. The clause INCLUDING DATAFILES removes the PDB
data files from disk. The default is KEEP DATAFILES , which does not remove the data files.
Regardless, the TEMP files are removed. Archived redo log files and backups associated with
the PDB are not removed. If you want to remove those files, use Oracle Recovery Manager
(RMAN), as described in Chapter 6, “Reporting, Monitoring, and Tuning with RMAN.”
A PDB must have been opened at least once prior to unplugging or drop-
ping it. In SQL*Plus from the CDB, issue the ALTER PLUGGABLE DATABASE
pdb_name OPEN; command.
Unplugging a PDB Using the DBCA
In this section we'll discuss and demonstrate how to unplug a PDB using the Database
Configuration Assistant. The DBCA simplifies the operation and is the preferred method
to unplug a PDB.
1. Launch the DBCA, and from the Database Operations page (Step 1), choose the Manage
Pluggable Databases option; then click Next.
2. In Step 2, select Unplug A Pluggable Database, as shown in Figure 11.26; then click Next.
3. Choose the CDB that hosts the PDB you wish to unplug, as shown in Step 3,
Figure 11.27. Enter the credentials for the common user with SYSDBA privileges.
4. In Step 4, select the PDB that you want to unplug from the drop-down list. For this
example, choose the most recently created PDB, PDB3 . You'll also choose to generate a
pluggable database file set, allowing the defaults as shown in Figure 11.28.
Click Next to continue to the Summary page, Step 5, shown in Figure 11.29.
5. Once you've confirmed that this is the correct PDB to unplug, click Finish to begin
Step 6, the unplugging, and monitor the progress, as shown in Figure 11.30.
If the selected PDB has not been opened prior to this, then you'll receive an error
message, as in Figure 11.31.
Once the database is unplugged successfully, you'll see the pop-up window indicating
success, as in Figure 11.32.
Search WWH ::




Custom Search