RMAN Duplicating Sparse PDBs

                    Duplicating Sparse PDBs
                     (Source: Oracle Docs)

Use the DUPLICATE command to duplicate sparse pluggable databases (PDBs).

To duplicate a sparse PDB:

Complete the planning tasks described
Use the PLUGGABLE DATABASE syntax of the BACKUP command to copy only the backups of a specific PDB.

For example, the following command transfers only the backups files for the PDB pdb3:

BACKUP COPY OF PLUGGABLE DATABASE pdb3;

Create the auxiliary instance as a CDB. To do so, start the instance with the following declaration in the initialization parameter file:

enable_pluggable_database=TRUE

When instructed to create an initialization parameter file for the auxiliary instance, you must copy the file from the source database. This ensures that the auxiliary instance is also a CDB. After copying, perform the following steps:

Modify the DB_NAME parameter

Modify the various destination/location parameters

When instructed to connect to the necessary instances, connect to the root as a user with SYSDBA or SYSBACKUP privilege. On both instances, the password for the user performing the duplication must be the same.

Start RMAN and connect to the root as a user with the SYSDBA or SYSBACKUP privilege.
On both the auxiliary instance and the target database, the password for the user performing the duplication must be the same.

Optionally Configure RMAN channels to improve duplication performance.

Run the DUPLICATE command with the PLUGGABLE DATABASE and FROM SPARSE options.

To duplicate PDB pdb1 to CDB cdb2, run the following command:

DUPLICATE FROM SPARSE to cdb2 PLUGGABLE DATABASE pdb1;

Note:The base (read-only) data files in a sparse database are not encrypted. Ensure that the base data files are stored in a protected storage and accessed using secured communications.

Duplicating Tablespaces Within a PDB to a New CDB

You can duplicate one or more tablespaces within a PDB to a new CDB by using the DUPLICATE command.

To duplicate tablespaces within a PDB:

Ensure that you have completed Steps 1 to 4 in Duplicating a PDB to a New CDB.

Run the DUPLICATE command with the TABLESPACE option described in About Duplicating PDBs.

The following are some examples of duplicating tablespaces that are contained in PDBs:

To duplicate the users tablespace that is part of PDB pdb1, use the following command:

DUPLICATE DATABASE TO cdb1 TABLESPACE pdb1:users;

To duplicate the PDB pdb1 and the users tablespace in PDB pdb2, use the following command:

DUPLICATE DATABASE TO cdb1 PLUGGABLE DATABASE pdb1 TABLESPACE pdb2:users;

Related Posts: