The db2util.ps1 utility supports the following options and input file parameters.
Query Options
The following options are available when you want to query Commvault for backup information.
|
Option |
Description |
|---|---|
|
-q |
Query operation Valid values are:
|
|
-c |
This is the client name presented on the CommCell. For a cluster setup, this client name is virtual machine client name. |
|
-s |
This is the DB2 instance name |
|
-d |
This is the DB2 database name |
|
-i |
This is theCommvaultinstance name. |
|
-o |
Target database name. This is an optional option. If you do not provide this option, Commvault assumes the source database name to use. |
|
-r |
Retrieves the log files under the db2 retrieve path. |
|
-f |
The start date and time to include in the query. Enclose the date and time in single quotation marks and use the following format: MM-DD-YYYY hh:mm:ss For example, '01-11-2019 10:00:00' Use the -f option with the -t option. Note
|
|
-t |
The end date and time to include in the query. Enclose the date and time in single quotation marks and use the following format: MM-DD-YYYY hh:mm:ss For example, '04-11-2019 10:00:00' Use the -t option with the -f option. |
|
-h |
Prints usage information |
Restore Options
The following options are available when you want to restore the data.
|
Option |
Description |
Additional Information |
|---|---|---|
|
-r |
Restore operation Valid values are:
|
|
|
-d |
Name of database to be restored |
|
|
-j |
Backup job id for the data or log to be restored. |
The IntelliSnap (non-traditional DB2 backup image) is not supported when you provide the job ID. All job IDs must be for traditional DB2 jobs. |
|
-f |
Start Log Sequence number |
If you use -r JOB, the -f and -t options for the range of DB2 logs is ignored. |
|
-t |
End Log sequence number |
|
|
-p |
The destination path. This is a mandatory parameter for Windows configurations. You must specify this parameter to have the software restore the DB2 backup image files to the location. |
|
|
-s |
Source Db2 instance name |
|
|
-c |
Source Client name |
|
|
-n DPF |
To be specified for DPF clients |
|
|
-i |
Commvault Instance name |
-
Use this query on a cross-machine restore to query and restore the backup image to the location. You must install the DB2 application and DB2 Agent on the destination . The DB2 version must be the same or higher.
-
Commvault supports restoring the backup image to disk using db2util.ps1 for a single job id only. The last job id in one cycle will be only be considered.
Input File Parameters
You can specify the following parameters in an input file.
|
Parameter |
Description |
|---|---|
|
CVSRCCLIENTNAME |
Source client name |
|
CVSRCDB2INSTANCENAME |
Source DB2 instance name |
|
OPERATION |
Specify an operation QA/QL/QD(QUERY) or RL/RJ(RESTORE) to be performed on database |
|
RESTOREDIR |
Directory where the backup job data is restored. This option is valid when OPERATION is set to RJ. |
|
JOBID |
Backup job ID for the data to be restored |
|
DBNAME |
Database name |
|
APPLICATION DPF |
Only for DPF |
|
FROMLSN |
The from log number |
|
TOLSN |
The to log number |