Performing a SAP for Oracle Database Copy

Perform a SAP for Oracle Database Copy when the original database host has been damaged or destroyed, and you need to restore the data to a different host from the backup.

The Commvault software automatically selects the SAP for Oracle Database Copy feature when:

  • The destination client is different and the destination instance is the same

  • The destination client is different and the destination instance is different

  • The destination client is the same and the destination instance is different

Note

The existing log and data summary files are overwritten. Detail files that have the same name as the ones you are restoring are overwritten.

If you do not want to open the database after the restore (Restore Options dialog box, Options tab, clear the Open DB check box), then the Commvault software uses the -DOD option with the brrecover command. When you choose this option, you must use BR*Tools 7.40 patch 30 or higher.

Best Practice: You can use this procedure to restore the database to a new machine or to a new SID.

Before You Begin

  • Perform a full backup with an online or offline subclient.

  • Verify the following:

    • On the source host and the destination host, The connection specifications (host, service name, port) in the tnsnames.ora file must be different.

    • On the source host and the destination host, the following must be the same:

      • Operating systems

      • Oracle version

      • Processor (32-bit or 64-bit)

    • The destination host must have enough disk space for the restored database.

  • On the destination host, verify that the following Oracle initialization files are present:

    • init<SID>.ora

    • init<SID>.sap

    • spfile<SID>.ora

  • On the destination host, install the SAP on Oracle application and then create an empty instance. The SAPDATA_HOME path on the destination host can be the same path or a different path from the source, but the directory structure inside the SAPDATA_HOME path must be the same.

  • Verify that the specification of the CONTROL_FILES parameter in the database initialization parameter file (init<SID>.ora) for the destination database corresponds to the specification for the source database. All control file mirror locations for the destination database must correspond to the similar specification for the source database.

    Control file locations specified in the source database and the destination database init<SID>.ora files should be similar to the following example.

    Source:

    CONTROL_FILES = (/oracle/PRD/sapdata1/cntrl/cntrlPRD.dbf
    /oracle/PRD/origlogA/cntrl/cntrlPRD.dbf
    /oracle/PRD/mirrorA/cntrl/cntrlPRD.dbf)

    Destination:

    CONTROL_FILES = (/oracle/CER/sapdata1/cntrl/cntrlCER.dbf
    /oracle/CER/origlogA/cntrl/cntrlCER.dbf
    /oracle/CER/mirrorA/cntrl/cntrlCER.dbf)
  • On the destination host, create a SAP for Oracle instance in the CommCell Console.

    Note

    You must have the source host and the destination host configured as clients in the same CommCell Console.

  • On the destination host, create the SPFILE (spfile<SID>.ora) from the Oracle initialization file. Go to the $ORACLE_HOME (for UNIX configurations) or %ORACLE_HOME%\database (on Windows configuration), and then type the following command:

    ssqlplus / as sysdba 
    SQL> startup nomount pfile= init<SID>.ora; 
    SQL> create spfile from pfile;

    Note

    Do not modify this file after you create it.

  • If you have more than 1000 logs, then to the SAP Oracle client, add the nBRRECOVER_NUMOFLOGSTORESTORE additional setting as shown in the following table.

    For instructions about adding an additional setting from the CommCell Console, see Adding an Additional Setting from the CommCell Console.

Property

Value

Name

nBRRECOVER_NUMOFLOGSTORESTORE

Category

OracleSapAgent

Type

Integer

Value

The number of logs that you need to restore.

  • Verify that the log_archive_dest or log_archive_dest_1 path and the log_archive_format parameters on the destination client and the source client are set based on SAP prerequisites for database copy restore. For more information, see SAP note 1003028.

Procedure

  1. From the CommCell Browser, expand Client Computers > client> SAP for Oracle.

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

  3. On the Browse and Restore dialog box, select Latest Backup and click View Content.

  4. Optional: Use non-default Browse and Restore options. See Browse and Restore.

  5. From the Browse window, select the data to restore in the right pane and click Recover All Selected.

    The Restore Options dialog box is displayed.

  6. On the General tab:

    1. From the Destination Client list, select a client computer.

      When you select a client computer that is different from the source computer, the software automatically makes all check boxes in the Restore Options section unavailable and automatically selects the Database Copy check box.

    2. From the Destination Instance list, select the instance that the software uses for the restore.

      When you select a client computer that is the same from the source computer and an instance that is different from the source instance, the software automatically makes all check boxes in the Restore Options section unavailable and automatically selects the Database Copy check box.

    3. Click Advanced.

      The Advanced Restore Options dialog box is displayed.

  7. To set the Commvault software to automatically move the database to the correct mode before the restore, select the Switch Database mode for Restore check box.

  8. To open the database after the restore, on the Options tab, make the following selections:

    • Select the Open DB check box.

    • Select Yes from the Reset Logs list.

    • When you restore from an offline backup, select the Reset Database check box.

  9. Optional: To recover the database to a point-in-time, on the Options tab:

    • Select the Point-in-time option.

    • Select the date to recover the database to from the calendar.

    • Type the time to recover the database to, in the date box.

  10. Click OK to close the Advanced Restore Options dialog box.

  11. Click OK to close the Restore Options dialog box and start the restore.

What to Do Next

If the job fails with the following error in the ClSapAgent.log file, then perform the following configuration, and then retry the job.

::AcceptIdleCallbackForOracleAgent() - Maximum idle time [180] is reached. Failing the job...

Property

Value

Name

nOraAgentSessionServerIdleTimeoutMaxCnt

Category

OracleSapAgent

Type

Integer

Value

The value is a counter that the software multiplies by 2 to set the number of minutes to wait.

For example, if you want the Commvault session to be idle for 1 hour, then set the additional setting to 30.

The software uses 90 by default, so the idle period is 3 hours (180 minutes).

Loading...