Plugging an Unplugged Pluggable Database
- You have to upgrade a PDB to the latest Oracle version, but you do not want to apply it on all PDBs. Instead of upgrading a CDB from one release to another, you can unplug a PDB from one Oracle Database release, and then plug it into a newly created CDB from a later release.
- You want to test the performance of the CDB without a particular PDB. You unplug the PDB, test the performance without the PDB and, if necessary, replug the PDB into the CDB.
- You want to maintain a collection of PDB “gold images” as unplugged PDBs.
Introduction
You can disassociate or unplug a PDB from a CDB and reassociate or plug the PDB into the same CDB or into another CDB. This capability is suitable for the following situations:- Plug the unplugged PDB by using the data files of the unplugged PDB. The unplugged PDB is disassociated from the source CDB.
- The source data files are used with or without any copy.
- The source data files are used after being moved to another location.
- Plug the unplugged PDB as a clone to:
- Allow developers and testers to rapidly and repeatedly provision a well-known starting state
- Support self-paced learning
- Provide a new way to deliver a brand-new application
Scenario
In this tutorial, you perform a PDB unplugging operation from a CDB. Next, you perform a plugging operation of the same PDB into another CDB by using SQL*Plus.Different plugging scenarios are allowed:
Prerequisites
Before starting this tutorial, you should:
- Install Oracle Database 12c.
- Create two CDBs with two PDBs in the first CDB.
-
The environment used in the development of this tutorial is as follows:
- ORACLE_HOME: /u01/app/oracle/product/12.1.0
- TNS Listener port: 1521
- Container databases:
- SID: cdb1
- SID: cdb2
- Pluggable databases (in cdb1):
- pdb1
- pdb2
-
To unplug a PDB, you first close it and then generate an XML manifest file.
The XML file contains information about the names and the full paths of the
tablespaces, as well as data files of the unplugged PDB. The information will be
used by the plugging operation.
In this section, you unplug two PDBs to plug them with different methods.
The unplugging operation makes changes in the PDB data files to record that the PDB was properly and successfully unplugged. Because the PDB is still part of the CDB, you can back it up in Oracle Recovery Manager (Oracle RMAN). This backup provides a convenient way to archive the unplugged PDB. After backing it up, you then remove it from the CDB catalog. But, of course, you must preserve the data files for the subsequent plugging operation.
-
In this section, you plug the unplugged PDB into another CDB by using
different methods.
Checking the Compatibility of the Unplugged PDB with the Host CDB
-
Before starting the plugging operation, make sure that the to-be-plugged-in
PDB is compatible with the new host CDB. Execution of the PL/SQL block raises an
error if it is not compatible.
Plugging the Unplugged PDB: NOCOPY Method
Plugging the Unplugged PDB: COPY Method
Plugging the Unplugged PDB: AS CLONE MOVE Method
-
Open and check the availability of the plugged PDB.
-
Perform the following steps to reset your environment prior to repeating the
activities covered in this OBE or starting another OBE.
Comments
Post a Comment
Oracle DBA Information