Creating a Duplicate Oracle Database

A duplicate (auxiliary) database is a copy or a subset of the target database and has a unique DBID. It is independent of the primary database and can be registered in the same recovery catalog as the primary database. The duplicate database is useful for testing and demonstration purposes.

If the duplicate (auxiliary) database already exists in the destination computer, it will be overwritten. The duplicate database is created from the full backup of the database with the logs. If you want the latest data in the duplicate database, perform a full backup with the log files before creating the duplicate database.

Note

You must have an RMAN backup copy in order to create a duplicate database.

On a Different Host with the Instance Configured

Before You Begin

  • Perform a full backup and include the log files for the original database.

  • If the source instance uses '/' as the connect string (Instance Properties, Details tab, Connect String), use sys/<password>@servicename for the target database connect string.

  • Create an Auxiliary Instance for the duplicate database. If you are using Oracle Release 10.2.0.5, include the "UNDO_MANAGEMENT=AUTO" parameter in the auxiliary instance Oracle PFILE.

  • On the destination host, add an instance on the CommCell Console.

  • Run the database readiness check on the auxiliary instance to verify that the instance is ready for backup and restore operations.

Procedure

  1. From the CommCell Browser, go to Client Computers > client > Oracle.

  2. Right-click the instance, then go to All Tasks > Browse and Restore.

    The Browse and Restore Options dialog box appears.

  3. Select Latest Backup, and then click the View Content button.

  4. Select the database, and then click the Recover All Selected button.

    The Oracle Restore Options dialog box appears.

  5. Click RMAN Duplicate DB, and then click Next.

    The Oracle RMAN Duplicate DB Options dialog box appears.

  6. Select the Destination Client from the list.

  7. To obtain the latest database status, click Refresh.

  8. In the Duplicate To box select the destination instance.

  9. In the Number of streams to use for restore box, specify the number of streams to use for the restore.

  10. Select Duplicate To.

    1. To skip the read-only tables, select the Skip Read Only check box.

    2. To open the database in restricted mode, select the Open Restricted check box.

    3. In the Pfile box, type the name of the startup parameter file for the duplicate database, or browse to the location.

  11. By default, RMAN verifies that the datafiles on the source and target database do not have the same names. If you want to allow the source and target databases to have the same names, select the No Filename Check check box. This option enables the Oracle NOFILENAMECHECK option.

  12. If you do not want the Commvault software to restore from a failover backup piece, select Disable Oracle Channel Restore Failover. The checkbox is selected by default to allow database corruptions to be displayed if they are detected.

  13. Verify that the Duplicate From Active Database check box is not selected.

  14. If you want the system to refer to the target database's control files rather than the Recovery Catalog database select NO CATALOG (already selected by default).

  15. If you want the system to refer to the Recovery Catalog database unselect NO CATALOG. The following items are activated:

    1. To create the duplicate database without connecting to the target database, select the Skip target connection check box.

    2. In the Catalog Connect box enter the Oracle catalog connect string credentials. If the source instance uses '/' as the connect string (Instance Properties, Details tab, Connect String), use sys/<password>@servicename for the target database connect string.

      • Enter the catalog user name.

      • Enter the catalog user password.

      • Enter the Oracle service name.

  16. Click Advanced.

    The Oracle Duplicate Options dialog box appears.

  17. Optional: If you do not want to use the DB_FILE_NAME_CONVERT option to restore all the data and temp files to a different directory structure from the source database, on the Redirect tab, select the redirected data:

    1. To redirect all data files, select Redirect All Table Spaces/Database to and type the path or Browse to it.

      • Alternatively, click the Redirect checkbox and select individual table spaces and type the path in the New Path box or Browse to it.

      • To redirect multiple table spaces simultaneously, click Find & Replace and replace the existing path with the new path.

    2. To redirect temporary tablespaces, select Redirect Temp Table Spaces To and type the path or Browse to it.

  18. Optional: If you want to create online redo logs for the duplicate database, on the Duplicate DB Options tab, select Duplicate to Log File.

    1. Select the Group option to use and specify redo log files by using group members and click Add, or the File option to specify redo log files by using a file, and click Add.

    2. If you selected the File option, in the Spec Dialog for Oracle Redo Log File box:

      • Type the redo log file name or browse to the location.

      • In the Size box, type the size of the online redo log file.

      • In the SizeSpec list, select the size specification of the file.

      • To allow the database to reuse an existing file, select the Reuse check box.

    3. If you selected the Group option, in the Spec Dialog for Oracle Redo Log Group box:

      • In the Size box, type the size of the online redo log file.

      • In the SizeSpec list, select the size specification of the file.

      • To allow the database to reuse an existing file, select the Reuse check box.

  19. Optional: If the backup is corrupted, restore from a storage policy copy instead of the backup. For more information on modifying the copy precedence of a storage policy copy, see Copy Precedence. On the Copy Precedence tab, select the Restore from copy precedence check box and enter a copy precedence number.

  20. Click OK to close the Oracle Duplicate Options dialog box.

    The Oracle RMAN Duplicate DB Options dialog box appears.

  21. To verify that the status of the duplicate database is STARTED, click Refresh.

  22. Optional: View or customize the RMAN script that is automatically generated from the selected options. For more information, see Viewing Oracle Restore RMAN Scripts and Customizing Oracle Restore RMAN Scripts.

  23. Click OK to start the restore.

On the Same Host with the Instance Configured

Before You Begin

  • Perform a full backup and include the log files for the original database.

  • Create an Auxiliary Instance for the duplicate database. If you are using Oracle Release 10.2.0.5, include the "UNDO_MANAGEMENT=AUTO" parameter in the auxiliary instance Oracle PFILE.

  • Run the database readiness check on the auxiliary instance to verify that the instance is ready for backup and restore operations.

Procedure

  1. From the CommCell Browser, go to Client Computers > client > Oracle.

  2. Right-click the instance, then go to All Tasks > Browse and Restore.

    The Browse and Restore Options dialog box appears.

  3. Select Latest Backup, and then click the View Content button.

  4. Select the database, and then click the Recover All Selected button.

    The Oracle Restore Options dialog box appears.

  5. Click RMAN Duplicate DB, and then click Next.

    The Oracle RMAN Duplicate DB Options dialog box appears.

  6. Select the Destination Client from the list.

  7. To obtain the latest database status, click Refresh.

  8. In the Duplicate To box select the destination instance.

  9. In the Number of streams to use for restore box, specify the number of streams to use for the restore.

  10. Select Duplicate To.

    1. To skip the read-only tables, select the Skip Read Only check box.

    2. To open the database in restricted mode, select the Open Restricted check box.

    3. In the Pfile box, type the name of the startup parameter file for the duplicate database, or browse to the location.

  11. By default, RMAN verifies that the datafiles on the source and target database do not have the same names. If you want to allow the source and target databases to have the same names, select the No Filename Check check box. This option enables the Oracle NOFILENAMECHECK option.

  12. Click Advanced.

    The Oracle Duplicate Options dialog box appears.

  13. Optional: If you do not want to use the DB_FILE_NAME_CONVERT option to restore all the data and temp files to a different directory structure from the source database, on the Redirect tab, select the redirected data:

    1. To redirect all data files, select Redirect All Table Spaces/Database to and type the path or Browse to it.

      • Alternatively, click the Redirect checkbox and select individual table spaces and type the path in the New Path box or Browse to it.

      • To redirect multiple table spaces simultaneously, click Find & Replace and replace the existing path with the new path.

    2. To redirect temporary tablespaces, select Redirect Temp Table Spaces To and type the path or Browse to it.

  14. Optional: If you want to create online redo logs for the duplicate database, on the Duplicate DB Options tab, select Duplicate to Log File.

    1. Select the Group option to use and specify redo log files by using group members and click Add, or the File option to specify redo log files by using a file, and click Add.

    2. If you selected the File option, in the Spec Dialog for Oracle Redo Log File box:

      • Type the redo log file name or browse to the location.

      • In the Size box, type the size of the online redo log file.

      • In the SizeSpec list, select the size specification of the file.

      • To allow the database to reuse an existing file, select the Reuse check box.

    3. If you selected the Group option, in the Spec Dialog for Oracle Redo Log Group box:

      • In the Size box, type the size of the online redo log file.

      • In the SizeSpec list, select the size specification of the file.

      • To allow the database to reuse an existing file, select the Reuse check box.

  15. Click OK to close the Oracle Duplicate Options dialog box.

    The Oracle RMAN Duplicate DB Options dialog box appears.

  16. Click OK to start the restore.

Excluding Read-Only Tablespaces during a Restore

By default, the read-only tablespaces are not verified for consistency and are restored from the backup. You can skip the consistent tablespaces and restore the tablespaces that are not consistent or missing. This will save the time taken for the restore.

Use the following steps to exclude read-only table spaces during restore:

  1. From the CommCell Browser, go to Client Computers > client > Oracle.

  2. Right-click the instance, then go to All Tasks > Browse and Restore.

    The Browse and Restore Options dialog box appears.

  3. Select Latest Backup, and then click the View Content button.

  4. Optional: Use non-default browse and restore options. For more information, see Browse and Restore.

  5. Select the database, and then click the Recover All Selected button.

    The Oracle Restore Options dialog box appears.

  6. Click RMAN Duplicate DB, and then click Next.

    The Oracle RMAN Duplicate DB Options dialog box appears.

  7. On the General tab, select the Destination Client from the list.

  8. In the Duplicate To box, select the destination instance.

  9. Select Duplicate To.

    1. To skip the read-only tables, select the Skip Read Only check box.

    2. In the Pfile box, type the name of the startup parameter file for the duplicate database, or browse to the location.

  10. Click OK to start the restore.

Opening the Database in Restricted Mode after a Restore

By default, a duplicated database is opened without any restricted access. If necessary, you can open the database in restricted mode for administrative tasks. This restricts access to other users.

Use the following steps to open the duplicate database in restricted mode:

  1. From the CommCell Browser, go to Client Computers > client > Oracle.

  2. Right-click the instance, then go to All Tasks > Browse and Restore.

    The Browse and Restore Options dialog box appears.

  3. Select Latest Backup, and then click the View Content button.

  4. Optional: Use non-default browse and restore options. For more information, see Browse and Restore.

  5. Select the database, and then click the Recover All Selected button.

    The Oracle Restore Options dialog box appears.

  6. Click RMAN Duplicate DB, and then click Next.

    The Oracle RMAN Duplicate DB Options dialog box appears.

  7. On the General tab, select the Destination Client from the list.

  8. In the Duplicate To box, select the destination instance.

  9. Select Duplicate To. In the Pfile box, type the name of the startup parameter file for the duplicate database, or browse to the location.

  10. To open the database in restricted mode, select the Open Restricted check box.

  11. Click OK to start the restore.

Excluding Tablespaces from a Restore

While creating a duplicate database, you can exclude some tablespaces from the duplicate database:

  1. From the CommCell Browser, go to Client Computers > client > Oracle.

  2. Right-click the instance, then go to All Tasks > Browse and Restore.

    The Browse and Restore Options dialog box appears.

  3. Select Latest Backup, and then click the View Content button.

  4. Optional: Use non-default browse and restore options. For more information, see Browse and Restore.

  5. Select the database, and then click the Recover All Selected button.

    The Oracle Restore Options dialog box appears.

  6. Click RMAN Duplicate DB, and then click Next.

    The Oracle RMAN Duplicate DB Options dialog box appears.

  7. On the General tab, select the Destination Client from the list.

  8. In the Duplicate To box, select the destination instance.

  9. Select Duplicate To. In the Pfile box, type the name of the startup parameter file for the duplicate database, or browse to the location.

  10. Click Advanced.

    The Oracle Duplicate Options dialog box appears.

  11. On the Duplicate DB Options tab, select the Duplicate To Skip Tablespace check box, and then click Add.

  12. In the tablespaces box, select the tablespaces to exclude from the duplicate database, and then click OK.

  13. Click OK to close the Oracle Duplicate Options dialog box.

  14. Click OK to start the restore.

Setting Up the Redo Log Files

You can create online redo logs for a duplicate database and apply them to restore the database in case of corruption. Use the following steps to create an online redo log file:

  1. From the CommCell Browser, go to Client Computers > client > Oracle.

  2. Right-click the instance, then go to All Tasks > Browse and Restore.

    The Browse and Restore Options dialog box appears.

  3. Select Latest Backup, and then click the View Content button.

  4. Optional: Use non-default browse and restore options. For more information, see Browse and Restore.

  5. Select the database, and then click the Recover All Selected button.

    The Oracle Restore Options dialog box appears.

  6. Click RMAN Duplicate DB, and then click Next.

    The Oracle RMAN Duplicate DB Options dialog box appears.

  7. On the General tab, select the Destination Client from the list.

  8. In the Duplicate To box, select the destination instance.

  9. Select Duplicate To. In the Pfile box, type the name of the startup parameter file for the duplicate database, or browse to the location.

  10. Click Advanced.

    The Oracle Duplicate Options dialog box appears.

  11. On the Duplicate DB Options tab, select Duplicate to Log File.

    1. Select the File option to specify redo log files using a file, and click Add.

    2. In the Spec Dialog for Oracle Redo Log File box:

      • Type the redo log file name or browse to the location.

      • In the Size box, type the size of the online redo log file.

      • In the SizeSpec list, select the size specification of the file.

      • To allow the database to reuse an existing file, select the Reuse check box.

      • Click OK.

  12. Click OK to close the Oracle Duplicate Options dialog box.

  13. Click OK to start the restore.

To Add a Redo Log File for a Group

By default, groups are created to include specific online redo log members. Use the following steps to add specifications for each of these online redo log groups:

  1. From the CommCell Browser, go to Client Computers > client > Oracle.

  2. Right-click the instance, then go to All Tasks > Browse and Restore.

    The Browse and Restore Options dialog box appears.

  3. Select Latest Backup, and then click the View Content button.

  4. Optional: Use non-default browse and restore options. For more information, see Browse and Restore.

  5. Select the database, and then click the Recover All Selected button.

    The Oracle Restore Options dialog box appears.

  6. Click RMAN Duplicate DB, and then click Next.

    The Oracle RMAN Duplicate DB Options dialog box appears.

  7. On the General tab, select the Destination Client from the list.

  8. In the Duplicate To box, select the destination instance.

  9. Select Duplicate To. In the Pfile box, type the name of the startup parameter file for the duplicate database, or browse to the location.

  10. Click Advanced.

    The Oracle RMAN Duplicate Options dialog box appears.

  11. On the Duplicate DB Options tab, select Duplicate to Log File.

    1. Select the Group option to use and specify redo log files by using group members and click Add.

    2. In the Spec Dialog for Oracle Redo Log Group box:

      • In the Size box, type the size of the online redo log file.

      • In the SizeSpec list, select the size specification of the file.

      • To allow the database to reuse an existing file, select the Reuse check box.

      • Click OK.

  12. Click OK to close the Oracle Duplicate Options dialog box.

  13. Click OK to start the restore.

Disabling File Name Validation during a Restore

By default, when you create a duplicate or standby database, RMAN verifies the target datafiles for duplicate files (files sharing the same names). This verification job may consume more time. You can use the following steps to prevent RMAN from performing this verification:

  1. From the CommCell Browser, go to Client Computers > client > Oracle.

  2. Right-click the instance, then go to All Tasks > Browse and Restore.

    The Browse and Restore Options dialog box appears.

  3. Select Latest Backup, and then click the View Content button.

  4. Optional: Use non-default browse and restore options. For more information, see Browse and Restore.

  5. Select the database, and then click the Recover All Selected button.

    The Oracle Restore Options dialog box appears.

  6. Click RMAN Duplicate DB, and then click Next.

    The Oracle RMAN Duplicate DB Options dialog box appears.

  7. On the General tab, select the Destination Client from the list.

  8. In the Duplicate To box, select the destination instance.

  9. Select Duplicate To. In the Pfile box, type the name of the startup parameter file for the duplicate database, or browse to the location.

  10. Select the No Filename Check check box.

  11. Click OK to begin the restore.

Redirecting Datafiles and Tempfiles during a Restore

If you want to restore all data and temp files to a different directory structure than the source database and do not want to use DB_FILE_NAME_CONVERT, you can redirect these data and temp files to a duplicate database during the restore. Refer to Customizing RMAN Script from the CommCell Console to update the script and to submit a duplicate restore.

Use the following steps to redirect all data and temp files:

  1. From the CommCell Browser, go to Client Computers > client > Oracle.

  2. Right-click the instance, then go to All Tasks > Browse and Restore.

    The Browse and Restore Options dialog box appears.

  3. Select Latest Backup, and then click the View Content button.

  4. Optional: Use non-default browse and restore options. For more information, see Browse and Restore.

  5. Select the database, and then click the Recover All Selected button.

    The Oracle Restore Options dialog box appears.

  6. Click RMAN Duplicate DB, and then click Next.

    The Oracle RMAN Duplicate DB Options dialog box appears.

  7. On the General tab, select the Destination Client from the list.

  8. In the Duplicate To box, select the destination instance.

  9. Select Duplicate To. In the Pfile box, type the name of the startup parameter file for the duplicate database, or browse to the location.

  10. Click Advanced.

    The Oracle RMAN Duplicate Options dialog box appears.

  11. On the Redirect tab, select Redirect All Table Spaces/Database to and type the path or click Browse for the path to redirect all data files.

  12. Select Redirect Temp Table Spaces To and type the path or click Browse for the path to redirect temp tablespaces.

  13. Click OK to close the Oracle RMAN Duplicate Options dialog box.

  14. Click OK to start the restore.

×

Loading...