This tutorial covers the steps required to clone a
pluggable database (PDB) from a container database (CDB) into
the same CDB.
Time to Complete
Approximately 15 minutes
You can copy a source PDB from a CDB and plug the copy into the same CDB or into another CDB. This capability is suitable for the following situations:
- You want to test the application patch of your production PDB. You first clone your production application in a cloned PDB, patch the cloned PDB, and test it.
- You want to diagnose performance issues or perform performance regression tests on your application. Because you cannot perform this operation in parallel with the production in the same database, you clone the PDB into another CDB.
In this tutorial, you will use SQL*Plus to perform a PDB cloning operation within the same CDB.
Note: If you want to clone a PDB from a CDB into another CDB, you identify the source CDB by creating a database link to it from the CDB in which you want to create the clone.
Before starting this tutorial, you should:
- Ensure that you have enough disk space to hold a complete
clone of the PDB.
- Install Oracle Database 12c.
- Create one CDB with one PDB in it.
- ORACLE_HOME: /u01/app/oracle/product/12.1.0
- TNS Listener port: 1521
- Container databases:
- SID: cdb1
- SID: cdb2
- Pluggable databases (in cdb1):
The environment used in the development of this tutorial is as follows:
Preparing the Source PDB to Clone
In this section, you prepare the source PDB to be cloned and the target new PDB to be created.
Setting the Source PDB to READ ONLY Mode
Creating a Directory for the New Clone PDB
Configuring OMF to the Directory of the Clone PDB
Cloning the PDB Within the CDB
Use SQL*Plus to clone the PDB within the same CDB.
Setting the Source PDB Back to Open Mode
Resetting Your Environment
Perform the following steps to reset your environment prior to repeating the activities covered in this OBE or starting another OBE.
In this tutorial, you learned how to:
- Prepare an existing PDB to be cloned
within the same CDB
- Clone the PDB
- To learn more about pluggable databases, refer to additional OBEs in the Oracle Learning Library
Curriculum Developers: Dominique Jeunot, Jean-Francois Verrier
To navigate this Oracle by Example tutorial, note the following:
- Hide Header Buttons:
- Click the title to hide the buttons in the header. To show the buttons again, click the title again.
- Topic List:
- Click a topic to navigate to that section.
- Expand All Topics:
- Click the button to show or hide the details for the sections. By default, all topics are collapsed.
- Hide All Images:
- Click the button to show or hide the screenshots. By default, all images are displayed.
- Click the button to print the content. The content that is currently displayed or hidden is printed.
To navigate to a particular section in this tutorial, select the topic from the list.