Production databases require high availability and must have a minimal recovery time objective (RTO). Customers use the log shipping products that the database vendors supply to provide high availability. For DB2 databases, this is the DB2 High Availability and Disaster Recovery (HADR) option. This option continuously ships transactions from the production database to the standby database. The DB2 HADR option requires an additional HA license and resources.
You can use the Commvault solution to ship the DB2 transaction logs from the production database to the standby database.
Best Practice: The log directory must be the same name on the production and standby servers.
Notes:
-
The chain directory must be the same in both the production and standby databases. This means that the number of restores must be same for the production and standby databases so that the transactions are matched.
-
Once you use the stop or complete option for rollforward in the standby database, you cannot apply logs until you perform a full restore with the rollforward pending option, so that the transactions will be matched.
-
If you need to use the stop or complete option for rollforward in the standby database, you need to drop the standby database and recreate it with the redirect restore rollforward pending option.
Procedure
-
Create a data only subclient for the data backup set that contains all the production database data.
-
Create a log only subclient for the log backup set that contains the production database logs.
-
Configure the Commvault software to take automatic log backups on the production database. Choose one of the following options:
-
Perform the log backups on a schedule.
For information on configuring a backup schedule, see Schedule Backups.
-
Perform the log backups when the number of log files in the /etc/CommVaultRegistry/Galaxy/Instance001/Db2Agent/.properties directory reaches a threshold. You must set the sDb2ThresholdALFN additional setting to the log file threshold.
For information on setting the log threshold value, see Enabling Automatic Backup of Archive Logs.
-
-
On the production database, perform a cross-machine restore to the standby database.
-
Configure the standby database to be in roll-forward pending state:
On the standby database, edit the /etc/CommVaultRegistry/Galaxy/Instance001/Db2Agent/.properties file and add the following line, substituting the
Db2_instance_name
parameter with the standby instance name and theSTANDBY_DB_NAME
parameter with the standby database name.Note: The
Db2_instance_name
parameter must be in lower case and theSTANDBY_DB_NAME
parameter must be in upper case.<Db2_instance_name>_<STANDBY_DB_NAME>_sDb2RFPendingReqd Y
-
On the production database set frequent schedules for a cross-machine roll forward (from the production database to the standby database) with the roll forward to the end of the log option.