Restoring When the Data Directory Does Not Exist on the Target

You must create the target directories on the destination host for a cross-machine restore or disaster recovery, when they do not exist.

You can run the Create_Db_Dir.ps1 or Create_Db_Dir.sh scripts on either a Windows or UNIX configuration to create the directory structure. If you run the script when the directory exists, the directory structure is NOT overwritten.

Note: These scripts do not support table level or duplicate database restores. You can only use the scripts to restore a database to the same Oracle instance name, on the same or a different server.

Further details on SAP on Oracle Disaster Recovery can be found here.

Before You Begin

  1. The Create_Db_Dir.ps1 script is located under Commvault location.

  2. On Windows, run the script from the Commvault_installation\Create_Db_Dir.ps1 directory

Procedure

Parameters

The following table defines the parameters for both scripts.

If you do not specify the BackupJobID or PointInTime parameters, the current time is used for the Point-in-Time.

Parameter

Description

clientName

Specifies the name of the client as displayed in the CommCell Browser.

CommvaultInstance

The name of the Commvault instance.

DatabaseInstanceName

The name of the database instance.

BackupJobID

The Backup Job ID

PointInTime

The Point-in-Time

BackupSetName

For DB2 only. The name of the backup set.

UNIX

Synopsis

Create_Db_Dir.sh -c clientName -i CommvaultInstance -d DatabaseInstanceName -j BackupJobID OR -p PointInTime -b BackupSetName
  1. You must be a database instance user in the UNIX group of Commvault to run this utility.

  2. Log on to the CommServe computer.

  3. Go to the Commvault/Base directory to locate the Create_Db_Dir.sh utility.

  4. On the command line, type the following command.

    Create_Db_Dir.sh -c clientName -i CommvaultInstance -d DatabaseInstanceName -j BackupJobID OR -p PointInTime -b BackupSetName
Windows

Synopsis

Create_Db_Dir.ps1 -c clientName -i CommvaultInstance -d DatabaseInstanceName -j BackupJobID OR -p PointInTime -b BackupSetName
  1. On the Windows client computer command line, type the following command.

    qlogin -cs commserve_name -u commcell_user_name -p commcell_login_password
  2. Run the Windows PowerShell from the DB2 command prompt window.

  3. Enable PowerShell script execution on the system:

    Set-ExecutionPolicy Unrestricted
    
  4. In the Commvault_path\Base directory, at the PowerShell prompt, type the following command.

    Create_Db_Dir.ps1 -c clientName -i CommvaultInstance -d DatabaseInstanceName -j BackupJobID OR -p PointInTime -b BackupSetName
  5. At the PowerShell prompt, disable the PowerShell script execution on the system:

    powershell Set-ExecutionPolicy Restricted
    

What To Do Next

  • Copy the init file from the source to the restore host.
×

Loading...