Skip to main content
SnapCenter Software 4.9
A newer release of this product is available.

Clone a pluggable database

Contributors netapp-soumikd

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.

Before you begin

If you have installed the plug-in as a non-root user, you should manually assign the execute permissions to the prescript and postscript directories.

Steps

  1. In the left navigation pane, click Resources, and then select the appropriate plug-in from the list.

  2. In the Resources page, select either Database or Resource Group from the View list.

  3. 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.

  4. From the Manage Copies view, select the backups either from Local copies (primary), Mirror copies (secondary), or Vault copies (secondary).

  5. Select the backup from the table, and then click clone icon.

  6. In the Name page, perform the following actions:

    1. Select PDB Clone.

    2. Specify the PDB that you want to clone.

      Note You can clone only one PDB at a time.
    3. Specify the name of the clone PDB.

  7. In the Locations page, perform the following actions:

    For this field…​

    Do this…​

    Clone host

    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.

    Target CDB

    Select the CDB where you want to include the cloned PDB.

    You should ensure that the target CDB is running.

    Database State

    Select the Open the cloned PDB in READ-WRITE mode checkbox if you want to open the PDB in READ-WRITE mode.

    Datafile locations

    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.

    Note 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.

  8. In the PreOps page, perform the following steps:

    1. 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.

      SnapCenter allows you to use the predefined environment variables when you execute the prescript and postscript. Learn more

    2. In the Auxiliary CDB clone database parameter settings section, modify the values of prepopulated database parameters that are used to initialize the database.

  9. Click Reset to get the default database parameter settings.

  10. In 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.

    Note 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

    Until Cancel

    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.

    Note 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 not selected for the auxiliary clone database.

    Select the check box if you want to generate a unique number (DBID) for the auxiliary cloned database differentiating it from the source database.

    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.

    Note If the clone operation fails, postscripts will not be executed and cleanup activities will be triggered directly.
  11. In 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 clone operation performed, select Attach Job Report.

    Note For email notification, you must have specified the SMTP server details using the either the GUI or the PowerShell command Set-SmSmtpServer.
  12. Review the summary, and then click Finish.

  13. 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 PDBs on the other nodes of the RAC are in MOUNT 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