Clone a pluggable database
Contributors Download PDF of this page
You can clone a pluggable database (PDB) to a different or same target CDB on the same host or alternate host. You can also recover the cloned PDB to a desired SCN or date and time.
In the left navigation pane, click Resources, and then select the appropriate plug-in from the list.
In the Resources page, select either Database or Resource Group from the View list.
Select the database of type single instance (multitenant) either from the database details view or from the resource group details view.
The database topology page is displayed.
From the Manage Copies view, select the backups either from Local copies (primary), Mirror copies (secondary), or Vault copies (secondary).
Select the backup from the table, and then click .
On the Name page, perform the following actions:
Select PDB Clone.
Specify the PDB that you want to clone.
You can clone only one PDB at a time.
Specify the name of the clone PDB.
On the Locations page, perform the following actions:
For this field…
By default, the source database host is populated.
If you want to create the clone on an alternate host, select the host having the same version of Oracle and OS as that of the source database host.
Select the CDB where you want to include the cloned PDB.
You should ensure that the target CDB is running.
Select the Open the PDB to be cloned in READ-WRITE mode checkbox if you want to open the PDB in READ-WRITE mode.
By default, the datafile location is populated.
The SnapCenter default naming convention for SAN or NFS file systems is FileSystemNameofsourcedatabase_SCJOBID.
The SnapCenter default naming convention for ASM disk groups is SC_HASHCODEofDISKGROUP_SCJOBID. The HASHCODEofDISKGROUP is an automatically generated number (2 to 10 digits) that is unique for each ASM disk group.
If you are customizing the ASM disk group name, ensure that the name length adheres to the maximum length supported by Oracle.
If you want to specify a different path, you must enter the datafile mount points or ASM disk group names for clone database.
The Oracle home, user name, and group details are automatically populated from the source database. You can change the values based on the Oracle environment of the host where the clone will be created.
On the PreOps page, perform the following steps:
Enter the path and the arguments of the prescript that you want to run before the clone operation.
You should store the prescript either in /var/opt/snapcenter/spl/scripts or in any folder inside this path. By default, the /var/opt/snapcenter/spl/scripts path is populated. If you have placed the script in any folder inside this path, you need to provide the complete path up to the folder where the script is placed.
In the Auxiliary CDB clone database parameter settings section, modify the values of prepopulated database parameters that are used to initialize the database.
You can add additional parameters by clicking .
If you are using Oracle Standard Edition and the database is running in Archive log mode or you want restore a database from archive redo log, add the parameters and specify the path.
Fast recovery area (FRA) is not defined is the prepopulated database parameters. You can configure FRA by adding the related parameters.
The default value of log_archive_dest_1 is $ORACLE_HOME/clone_sid and the archive logs of the cloned database will be created in this location. If you have deleted the log_archive_dest_1 parameter, the archive log location is determined by Oracle. You can define a new location for archive log by editing log_archive_dest_1 but ensure that the file system or disk group should be existing and made available on the host.
Click Reset to get the default database parameter settings.
On the PostOps page, Until Cancel is selected by default to perform recovery of the cloned database.
The Until Cancel option is not selected if SnapCenter fails to find the appropriate log backups. You can provide the external archive log location if log backup is not available in Specify external archive log locations. You can specify multiple log locations.
If you want to clone a source database that is configured to support flash recovery area (FRA) and Oracle Managed Files (OMF), the log destination for recovery must also adhere to OMF directory structure. Field name Description
SnapCenter performs recovery by mounting the latest log backup having the unbroken sequence of archive logs after that data backup that was selected for cloning.
The log and data backup should be on primary storage to perform the clone on primary storage and log and data backup should be on secondary storage to perform the clone on secondary storage. The cloned database is recovered till the missing or corrupt log file.
Date and time
SnapCenter recovers the database up to a specified date and time.
The time can be specified in 24 hour format.
Until SCN (System Change Number)
SnapCenter recovers the database up to a specified system change number (SCN).
Specify external archive log locations
Specify the external archive log location.
Create new DBID
By default Create new DBID check box is selected to generate a unique number (DBID) for the cloned database differentiating it from the source database.
Clear the check box if you want to assign the DBID of the source database to the cloned database. In this scenario, if you want to register the cloned database with the external RMAN catalog where the source database is already registered, the operation fails.
Create tempfile for temporary tablespace
Select the check box if you want to create a tempfile for the default temporary tablespace of the cloned database.
If the check box is not selected, the database clone will be created without the tempfile.
Enter sql entries to apply when clone is created
Add the sql entries that you want to apply when the clone is created.
Enter scripts to run after clone operation
Specify the path and the arguments of the postscript that you want to run after the clone operation.
You should store the postscript either in /var/opt/snapcenter/spl/scripts or in any folder inside this path.
By default, the /var/opt/snapcenter/spl/scripts path is populated. If you have placed the script in any folder inside this path, you need to provide the complete path up to the folder where the script is placed.
On the Notification page, from the Email preference drop-down list, select the scenarios in which you want to send the emails.
You must also specify the sender and receiver email addresses, and the subject of the email. If you want to attach the report of the restore operation performed, select Attach Job Report.
For email notification, you must have specified the SMTP server details using the either the GUI or the PowerShell command Set-SmSmtpServer.
Review the summary, and then click Finish.
Monitor the operation progress by clicking Monitor > Jobs.
After you finish
If you want to create a backup of the cloned PDB, you should backup the target CDB where the PDB is cloned because backing up only the cloned PDB is not possible. You should create a secondary relationship for the target CDB if you want to create the backup with secondary relationship.
In a RAC setup the storage for cloned PDB is attached only to the node where the PDB clone was performed. The other nodes of the RAC are in MOUNTED state. If you want the cloned PDB to be accessible from the other nodes, you should manually attach the storage to the other nodes.
Find more information