Databases Reference
In-Depth Information
Duplicating Pluggable Databases and Container Databases
Problem
You want to duplicate a pluggable database or a container database.
Solution
In this Solution, we explain first how to duplicate a container database. Then we show how to duplicate a pluggable
database.
Duplicating a Container Database
To duplicate a whole container database, you follow the same initial steps as you do for a regular database, as shown
in Recipe 15-3. Make sure that when you connect to the target and the auxiliary databases that you connect to root .
Also ensure that the credentials are the same in both the source and the auxiliary database.
Back up the data files for the container database with the following command:
RMAN> backup copy of database;
If there are no image copies, you may experience the following error:
RMAN-06585: no copy of datafile 1 found
Duplicating a Pluggable Database
Follow these steps to duplicate a pluggable database.
1. First, complete steps 1-6 shown in Recipe 15-3.
You can transfer just the backup files for a pluggable database (in this case pdb3 ), by using the backup command
with the pluggable option. For example:
RMAN> backup copy of pluggable database pdb3;
If there are no image copies, you may experience the following error:
RMAN-06585: no copy of datafile 1 found
2.
Duplicate a pluggable database, called pdb1 in this example, with the following command:
RMAN> duplicate database to cdb1 pluggable database pdb1;
This command duplicates the pluggable database pdb1 to the container database cdb1.
3.
You can duplicate all the databases in a container database, with the exception of the
pluggable database pdb3 , by executing the following command:
RMAN> duplicate database to cdb1 skip pluggable database pdb3;
 
Search WWH ::




Custom Search