Topics| Related Topics
Besides running data protection and data recovery operations from the CommCell Console, you can use the third-party command line to run such operations for the following Agents:
Moreover, such operations for the SAP for Oracle and SAP for MAXDB iDataAgents can currently be run only from the third-party command line.
Be sure to consult the documentation for your product for information on running third-party command line operations.
Generally, the various CommServe job-reporting windows and job reports (including, e.g., Job Manager, Job Controller, Backup Job History report) provide details for third-party command line operations that are similar to those details provided for such operations run from the CommCell Console. The following section provides some exceptions in this regard.
Consider the following while executing third party commands:
For a 32-bit DB2 instance on AIX or Solaris, run db2 backup db <database name> load '<software install path>/Base/libDb2Sbt.so'
For a 64-bit DB2 instance on AIX or Solaris, run db2 backup db <database name> load '<software install path>/Base64/libDb2Sbt.so'
For a 32-bit or 64-bit DB2 instance on Linux, run db2 backup db <database name> load '<software install path>/Base/libDb2Sbt.so'
For a 32-bit DB2 instance on Windows, run db2 backup db <database name> load '<software install path>/Base/Db2Sbt.dll'
where <database name> is the name of the DB2 database (e.g., dbfirst) and<software install path> is the install path for the agent software (e.g., level1/install).
For a DB2 restore, run the appropriate DB2 third-party command per the following:
For a 32-bit DB2 instance on AIX or Solaris, run db2 restore db <database name> incremental automatic load '<software install path>/Base/libDb2Sbt.so' taken at <backup image date> without prompting
For a 64-bit DB2 instance on AIX or Solaris, run db2 restore db <database name> incremental automatic load '<software install path>/Base64/libDb2Sbt.so' taken at <backup image date> without prompting
For a 32-bit or 64-bit DB2 instance on Linux, run db2 restore db <database name> incremental automatic load '<software install path>/Base/libDb2Sbt.so' taken at <backup image date> without prompting
For a 32-bit DB2 instance on Windows, run db2 restore db <database name> incremental automatic load '<software install path>/Base/Db2Sbt.dll' taken at <backup image date> without prompting
where <database name> is the name of the DB2 database (e.g., dbfirst);<software install path> is the install path for the agent software (e.g., level1/install); and <backup image date> is the date of the backup image in the following format: "YYYYMMDDHHMMSS" (e.g., 20070612120426).>
After a restore, if you need to roll forward the DB2 database, run the following command:
db2 rollforward db <database name> to end of logs and complete
For more information on the db2 backup command or the db2 restore command, see the appropriate DB2 documentation.
db2 restore db pubs load <source software install path>/Base/libDb2Sbt.so taken at 20080627113811 on <destination software install path> into emp
If you need to roll-forward the database, be sure to first set the CvSrcDbName option for the LOGARCHOPT1 parameter to the source database name. For example:
db2 update db cfg for emp using LOGARCHOPT1 "'CvSrcDbName=pubs,CvClientName=<client name>,CvInstanceName=<CommServe instance name>"'
Then run the appropriate roll-forward command. For example:
db2 rollforward db emp to end of logs and stop
Before you run the restore, be sure to set the CvSrcDB2InstanceName option for the VENDOROPT parameter to the source database name (in this example, db2inst3). For example:
db2 update db cfg for emp01 using VENDOROPT "'CvSrcDB2InstanceName=db2inst3,CvClientName=supernova,CvInstanceName=Instance001"'
Then run the appropriate restore command. For example:
db2 restore db pubs load <source software install path>/Base/libDb2Sbt.so taken at 20080627113811 on <destination software install path> into emp01
If we replace the variables with some values, the command may be run as follows:
db2 restore db pubs load /opt/product/Base/libDb2Sbt.so taken at 20080627113811 on /home/db2inst4 into emp01
Ensure that you provide a destination path when you run this command. In the preceding example, if /home/db2inst4 is not provided, the data will be restored to /home/db2inst3/db2inst4. |
If you need to roll-forward the database, be sure to first set two options for the LOGARCHOPT1 parameter. Specifically, set the CvSrcDbName option to the source database name, and set the CvSrcDB2InstanceName option to the source DB2 instance name. For example:
db2 update db cfg for emp01 using LOGARCHOPT1 "'CvSrcDbName=pubs,CvSrcDB2InstanceName=db2inst3,CvClientName=supernova,CvInstanceName=Instance001"'
Then run the appropriate roll-forward command. For example:
db2 rollforward db emp01 to end of logs and stop
Before you run the restore, be sure to first set two options for the VENDOROPT parameter. Specifically, set the CvSrcClientName option to the source client name, and set the CvSrcDB2InstanceName option to the source DB2 instance name. For example:
db2 update db cfg for emp01 using VENDOROPT "'CvSrcDB2ClientName=supernova,CvSrcDB2InstanceName=db2inst3,CvClientName=neutronstar,CvInstanceName=Instance001"'
Then run the appropriate restore command. For example:
db2 restore db pubs load <source software install path>/Base/libDb2Sbt.so taken at 20080627113831 on <destination software install path> into emp
If we replace the variables with some values, the command may be run as follows:
db2 restore db pubs load /opt/product/Base/libDb2Sbt.so taken at 20080627113811 on /home/db2inst4 into emp
Ensure that you provide a destination path when you run this command to produce the correct result. In the preceding example, if /home/db2inst4 is not provided, the data will be restored to /home/db2inst3/db2inst4. |
If you need to roll-forward the database, be sure to first set several options for the LOGARCHOPT1 parameter. Specifically, set the CvSrcDbName option to the source database name, the CvSrcClientName option to the source client name, and the CvSrcDB2InstanceName option to the source instance name. For example:
db2 update db cfg for emp using LOGARCHOPT1 "'CvSrcDbName=pubs,CvSrcClientName=supernova,CvSrcDB2InstanceName=db2inst3,CvClientName=neutronstar,CvInstanceName=Instance001"'
Then run the appropriate roll-forward command. For example:
db2 rollforward db emp to end of logs and stop
For DB2 DPF, the following options are available:
db2_all ";db2 update db cfg for <database name> using <parameter name> recovery"
where <database name> is the name of the DB2 database (e.g., pubs); <parameter name> is the name of the DB2 configuration parameter (e.g., logretain).
To set a configuration parameter for a specific database for a series of nodes but one node at a time, run the following series of commands for each node:
export DB2NODE=<node>
db2 terminate
db2 update db cfg for <database name> using <parameter name> recovery
where <node> is the number of the node. For example:
export DB2NODE=0
db2 terminate
db2 update db cfg for pubs using logretain recovery
export DB2NODE=1
db2 terminate
db2 update db cfg for pubs using logretain recovery
db2_all "<<+<node number>< db2 update db cfg for pubs using logretain recovery
db2_all "<<+<node number>< db2 backup db pubs
db2_all "<<+<node number>< db2 backup db pubs load <software install path>/Base/libDb2Sbt.so
where <node number> is the number of the node; <software install path> is the install path for the agent software. For example:
db2_all "<<+0< db2 backup db pubs load /database/level1/Base/libDb2Sbt.so
To perform an action (e.g., backup) on all the nodes expect one node (e.g., 0), you can run commands similar to the following:
db2_all "|<<-0< db2 backup db pubs
db2_all "|<<-0< db2 backup db pubs load /database/level1/Base/libDb2Sbt.so
db2_all "<<+0< db2 restore db pubs02 load /database/level1/Base/libDb2Sbt.so taken at 20080408165002 without prompting"
db2_all "<<+1< db2 restore db pubs02 load /database/level1/Base/libDb2Sbt.so taken at 20080408165107 without prompting"
db2_all "<<+2< db2 restore db pubs02 load /database/level1/Base/libDb2Sbt.so taken at 20080408164536 without prompting"
db2_all "<<+3< db2 restore db pubs02 load /database/level1/Base/libDb2Sbt.so taken at 20080408164559 without prompting"
Then run the following commands:
export DB2NODE=0
db2 terminate
Finally, run the roll-forward operation. For example:
db2 rollforward db to end of logs and stop pubs02
The trailing status will display details on the roll-forward operation for the four identified nodes.
export DB2NODE=0
db2 recover db pubs 02
The trailing status in this case will display details on the recover operation for the same four nodes identified in the roll-forward operation.
export DB2NODE=0
db2 terminate
Then run the restore for the node. For example:
db2 restore db pubs01 load <software install path>/Base/libDb2Sbt.so taken at 20080701073606 into pubs02 without prompting
Continuing with the next node, run the following commands:
export DB2NODE=1
db2 terminate
Then run the restore for the node. For example:
db2 restore db pubs01 load <software install path>/Base/libDb2Sbt.so taken at 2008070107353 into pubs02 without prompting
Continue this sequence for each node.
If you need to roll-forward the database, be sure to first set for each node the CvSrcDbName option for the LOGARCHOPT1 parameter to the source database name. For example, starting with the first node, run the following commands:
export DB2NODE=0
db2 terminate
db2 update db cfg for pubs02 using LOGARCHOPT1 "'CvSrcDbName=pubs01,CvClientName=<client name>,CvInstanceName=<CommServe instance name>, CvDpfClientName=<DPF Pseudo-Client Name>"'
Continuing with the next node, run the following commands:
export DB2NODE=1
db2 terminate
db2 update db cfg for pubs02 using LOGARCHOPT1 "'CvSrcDbName=pubs01,CvClientName=<client name>,CvInstanceName=<instance name>, CvDpfClientName=<DPF Pseudo-Client Name>"'
Continue this sequence for each node.
Then run the appropriate roll-forward command. For example:
db2 rollforward db pubs02 to end of logs and stop
Before running a restore to a different DB2 DPF
pseudo-client, ensure the following:
|
For each node, before you run the restore, be sure to first set two options for the VENDOROPT parameter. Specifically, set the CvSrcDB2Instance Name option to the source DB2 instance name, and set the CvSrcClientInstanceName option to the source DB2 DPF pseudo-client name. For example:
export DB2NODE=0
db2 terminate
db2 update db cfg for emp using VENDOROPT "'CvSrcDB2InstanceName=db2inst1,CvSrcClientName=DPF_INST1,CvClientName=supernova,CvInstanceName=Instance001,CvDpfClientName=DPF_INST2"'
Continuing with the next node, run the following commands:
export DB2NODE=1
db2 terminate
db2 update db cfg for emp using VENDOROPT "'CvSrcDB2InstanceName=db2inst1,CvSrcClientName=DPF_INST1,CvClientName=supernova,CvInstanceName=Instance001,CvDpfClientName=DPF_INST2"'
Continue this sequence for each node.
Then run a restore for each node. For example, starting with the first node:
export DB2NODE=0
db2 terminate
db2 restore db pubs01 load /opt/product/Base/libDb2Sbt.so taken at 20080701073606 on /db2home1/db2inst2 into emp without prompting
For this command, the destination path option (on /db2home1/db2inst2 in this example) will work only for the catalog node since the restore operation on a non-catalog database partition cannot specify automatic storage paths. Also, ensure that you provide a destination path when you run this command to produce the correct result. In this example, if on /db2home1/db2inst2 is not provided, the data will be restored to /db2home1/db2inst1/db2inst2. |
Continuing with the next node, run the following commands:
export DB2NODE=1
db2 terminate
db2 restore db pubs01 load /opt/product/Base/libDb2Sbt.so taken at 20080701073653 into emp without prompting
Continue this sequence for each node.
If you need to roll-forward the database, be sure to first set for each node several options for the LOGARCHOPT1 parameter. Specifically, set the CvSrcClientName option to the source pseudo-client name, the CvSrcDB2InstanceName option to the source instance name, and the CvSrcDbName option to the source database name. For example:
export DB2NODE=0
db2 terminate
db2 update db cfg for emp using LOGARCHOPT1 "'CvSrcDbName=pubs01,CvSrcDB2InstanceName=db2inst1,CvSrcClientName=DPF_INST1,CvClientName=supernova,CvInstanceName=Instance001, CvDpfClientName=DPF_INST2"'
Continuing with the next node, run the following commands:
export DB2NODE=1
db2 terminate
db2 update db cfg for emp using LOGARCHOPT1 "'CvSrcDbName=pubs01,CvSrcDB2InstanceName=db2inst1,CvSrcClientName=DPF_INST1,CvClientName=supernova,CvInstanceName=Instance001, CvDpfClientName=DPF_INST2"'
Continue this sequence for each node.
Then run the appropriate roll-forward command. For example:
db2 rollforward db emp to end of logs and stop
export CvClientName=Client1
export
CvInstanceName=Instance
where Client1 is the name of the Informix client and Instance001 is the name of the instance.
allocate channel ch1 type 'sbt_tape'
PARMS="SBT_LIBRARY=<software install path>/Base/libobk.so,ENV=(CvClientName=clientname,CvInstanceName=instancename)"
where clientname and instancename are the names of the Client and Instance (e.g., Instance001) on which the iDataAgent is installed. In the case of Orace RAC iDataAgent, you also need to specify connect string value and the Oracle RAC database name as shown in the example below:
allocate channel ch2 type 'sbt_tape' connect connectstring
PARMS="SBT_LIBRARY=<software install path>/Base/libobk.so,ENV=(CvClientName=clientname,CvInstanceName=instancename,CVOraRacDBName=databasename)";
where connectstring is the SQL connect string value (e.g., rac2/rac2@racdb2) and databasename is the name of the Oracle RAC database.
The SBT_LIBRARY for the various platforms are listed below:
Platform | SBT_LIBRARY |
AIX with 64 bit Oracle | <Client Agent Install Path>/Base/libobk.a(shr.o) |
HP UX PA RISC 64 bit Oracle, | <Client Agent Install Path>/Base64/libobk.sl |
Solaris with 64 bit Oracle | <Client Agent Install Path>/Base64/libobk.so |
All Other Unix platforms | <Client Agent Install Path>/Base/libobk.so |
SBT_LIBRARY is not applicable for Windows platform. |
For example, if the Oracle backup job used a non-default block size value (say, 32768), then during the third party command line restore operation, you need to specify the same block size value as follows;
allocate channel ch1 type 'sbt_tape'
PARMS=" SBT_LIBRARY=<software install path>/Base/libobk.so, ENV=(CvClientName=clientname,CvInstanceName=instancename),BLKSIZE=32768";
Also, for Oracle9i, if you perform a backup job using the default block size value from the CommCell Console , you need to specify the same block size value for the corresponding third party command line restore operation. This is because, the default block size value used by the Oracle iDataAgent in the CommCell Console is 262144, whereas the default block size value used by Oracle9i RMAN is 65536. Hence, if you run a third party command line restore for Oracle9i without specifying the block size, the restore fails. In such cases, specify the block size as follows:
allocate channel ch1 type 'sbt_tape'
PARMS=" SBT_LIBRARY=<software install path>/Base/libobk.so, ENV=(CvClientName=clientname,CvInstanceName=instancename),BLKSIZE=262144";
However, in the case of Oracle10g, if the backup job (performed from the CommCell Console) used the default block size value, and you perform a third party command line restore operation without specifying the block size, the restore will succeed since the default block size value for Oracle iDataAgent and Oracle10g RMAN is the same (i.e., 262144).
allocate auxiliary channel ch1 type 'sbt_tape'
PARMS="SBT_LIBRARY=<software install path>/Base/libobk.so,BLKSIZE=262144,ENV=(CvClientName=clientname,CVOraRacDBClientName=RACDBsrcClientName,CvInstanceName=instancename,CVOraRacDBName=databasename)" TRACE 2; duplicate target database to <databasename>;
where, RACDBsrcClientName is the physical client name on which the RAC database runs.
CONFIGURE DEVICE TYPE 'SBT_TAPE' PARALLELISM 2 BACKUP TYPE TO BACKUPSET;
In the above example, RMAN allocates two channels for the device type when using automatic channels.
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE 'SBT_TAPE' TO 2;
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE 'SBT_TAPE' TO 2;
The above example specifies two copies of data and log backups. Now, during restore, even if one of the copies is missing or corrupted, the restore operation automatically failovers to the other copy and restores the data.
Note that multiple copies of data or log backup is only supported from third party command line.
See Also:
Third-party command line operations can produce unique output based on the associated Agent. Relevant issues are summarized in the following table.
iDataAgent(s) | Issue |
Informix Oracle Oracle RAC SAP for Oracle SAP for MAXDB |
Job Details may display the name defaultDummyInstanceFor<agent_name> as the SID when a restore is run from the command line. |
Informix Oracle Oracle RAC |
Whenever you run incremental backups from the third-party command line, the backups are reported as full backups in the Job Controller, Event Details dialog, and Backup Job History window and report. This is only a display issue; the backup jobs still run as incremental backups. |
Informix | Whenever you run backups from the third-party command line, the Job Manager starts one job for the data backup and another job for the log backup and then displays these jobs in the Job Controller. However, for backups that are run from the CommCell Console, the Job Manager correctly starts just one job for both the data phase and log phase and displays this job in the Job Controller. |
Oracle |
Prior to running backups from the
RMAN command line, ensure that the Oracle database name and the Instance
Name as defined in the CommCell Console are the same, otherwise you will
need to pass the name of the instance in the RMAN script as follows: allocate channel ch1 type 'sbt_tape' PARMS="SBT_LIBRARY=<software install path>/Base/libobk.so,ENV=(CvClientName=clientname,CvInstanceName=instancename)" where clientname and instancename are the names of the Client and Instance (e.g., Instance001) on which the iDataAgent is installed. |
Oracle Oracle RAC |
Whenever you run backups from the RMAN command line, ensure that the Oracle
database name and the Instance Name as defined in the CommCell Console are
the same; otherwise, you will need to pass the name of the instance in the
RMAN script as follows:
allocate channel ch1 type 'sbt_tape' PARMS="ENV=(CvOraSID=instancename)" where instancename is the name of the instance as defined in the CommCell Console. |
Oracle RAC | To run a restore from the
RMAN command line, you must use the allocate command in the RMAN script and
set the environment variable on the client. For example: allocate channel ch2 type 'sbt_tape' connect connectstring PARMS="SBT_LIBRARY=<software install path>/Base/libobk.so,ENV=(CvClientName=clientname,CvInstanceName=instancename,CVOraRacDBName=databasename)"; where connectstring is the SQL connect string value (e.g., rac2/rac2@racdb2) and databasename is the name of the Oracle RAC database. |