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
-
The Create_Db_Dir.ps1 script is located under Commvault location.
-
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
-
You must be a database instance user in the UNIX group of Commvault to run this utility.
-
Go to the Commvault/Base directory to locate the Create_Db_Dir.sh utility.
-
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
-
On the Windows client computer command line, type the following command.
qlogin -cs commserve_name -u commcell_user_name -p commcell_login_password -
Run the Windows PowerShell from the DB2 command prompt window.
-
Enable PowerShell script execution on the system:
Set-ExecutionPolicy Unrestricted -
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 -
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.