Frequently Asked Questions - DB2

What Database Parameters Do You Need to Configure to Manage DB2 Archive Logs?

How Do the Logs Get Archived and Managed in Calypso?

How is a Log Backup Scheduled?

Is it Possible to Backup the Logs Directly to the Media?

Can I Perform DB2 Database Backups as a User with No Operating System Password?

Why Do We See Log Restore Jobs during Online Database FULL backup?

When do I have to take a Full Offline Backup for Successful Data Protection Operations using Calypso?

How Can I List My DB2 Database Backups and Log Backups?

Can We Protect Data on Non-Global Zones if the File System iDataAgent is Installed Only on the Global Zone?

How Do We protect DB2 Data on a Non-Global Zone?

How are Command Line Backup Images Displayed in the CommCell Console?

What are the Folders/Files Created and Changes Done During Install of this Agent?

Do We Need to Create a Common User Group on a Unix Client Computer that has Multiple Database Applications Residing on it?

What do I do when my DB2 V10 Online GUI backup fails because the specified DB2 configuration parameter is discontinued?

Can We Use USER EXIT method instead of LOGARCHMETH1vendor method to Backup DB2 Log Files?

What database parameters do you need to configure to manage DB2 Archive Logs?

You need to configure the LOGARCHMETH1 and LOGARCHOPT1 parameters to manage DB2 Archive Logs using Calypso VENDOR Library interface.

db2 update db cfg for sample using LOGARCHMETH1 "VENDOR:/opt/Calypso/Base64/libDb2Sbt.so"
db2 update db cfg for sample using LOGARCHOPT1 "'CvClientName=<db2client>,CvInstanceName=Instance001'"

How do the logs get archived and managed in Calypso?

  1. When an online log is full, DB2 requests Calypso VENDOR Library API to archive the logs.
  2. By default, Calypso archives the logs in ARCHIVE_PATH specified during Calypso installation.
  3. The logs will be moved to media when Logs backup is scheduled from CommCell console or when the number of Logs in Archive Path exceed the configured threshold.
  4. ARCHIVE PATH can be configured using sDB2_ARCHIVE_PATH registry key.

How is a log backup scheduled?

A new subclient (Logs only) needs to be created for each DB2 database and schedule backup for every nn hours. The frequency depends upon the transactional activity on the database.

Is it possible to backup the logs directly to the media?

Calypso copies the archive logs to ARCHIVE Path to efficiently utilize the Media resources. The Logs are then backed up to media.

It is possible to backup the logs directly to the media without copying to archive log path. You need to set sDb2ThresholdALFN registry key to 1.

Can I Perform DB2 Database Backups as a User with No Operating System Password?

Yes. Update-46055(db2PasswordLessUser) provided with the service pack 11a allows you to successfully perform your DB2 database backups as a password less Operating System user. However, this Update is applicable only for Unix based DB2 backups.

Why do we see log restore jobs during online Database FULL backup?

When do I have to take a full offline backup for successful data protection operations using Calypso?

When a database is in a roll forward recovery mode for the first time (i.e., when the LOGARCHMETH1 parameter value is set to either LOGRETAIN, USEREXIT, DISK, TSM, or VENDOR), perform a full offline backup for the database. In case of a HADR setup, perform the full offline backup on the primary database.

HOW CAN I LIST MY DB2 DATABASE BACKUPS AND LOG BACKUPS?

Yes. The query for database backups is as follows:

qoperation execscript -sn QS_querydb2backup -si '<Clientname>' -si '<InstanceName>' -si '<DB2DatabaseName>' -si '<DATA>'
QScript[QS_querydb2backup] CS[CSName] DB[CommServ] SP[QS_querydb2backup]

Qscript Output:

jobId bkupLevel timeStamp streams
----- --------- --------- -------
152519 Full 20121218111407 1
152333 Full 20121217180223 1
152332 Full 20121217180009 1

The query for log backups is as follows:

qoperation execscript -sn QS_querydb2backup -si '<Clientname>' -si '<InstanceName>' -si '<DB2DatabaseName>' -si '<LOGS>'
QScript[QS_querydb2backup] CS[CSName] DB[CommServ] SP[QS_querydb2backup]
 

Qscript Output:

jobId nodeNumber chainNumber firstLogNumber lastLogNumber firstLogTime lastLogTime
----- ---------- ----------- -------------- ------------- ------------ -----------
152988 NODE0000 C0000000 28 28 2012-12-19 18:32:48.000 2012-12-19 18:32:48.000
152987 NODE0000 C0000000 27 27 2012-12-19 18:32:00.000 2012-12-19 18:32:00.000
152973 NODE0000 C0000000 26 26 2012-12-19 17:38:17.000 2012-12-19 17:38:17.000
152972 NODE0000 C0000000 25 25 2012-12-19 17:37:17.000 2012-12-19 17:37:17.000
152969 NODE0000 C0000000 24 24 2012-12-19 17:33:07.000 2012-12-19 17:33:07.000
152968 NODE0000 C0000000 23 23 2012-12-19 17:31:57.000 2012-12-19 17:31:57.000
152796 NODE0000 C0000000 13 17 2012-12-19 02:40:03.000 2012-12-19 02:41:05.000
152795 NODE0000 C0000000 0 12 2012-12-07 18:15:53.000 2012-12-19 02:38:44.000
152650 NODE0000 C0000000 11 11 2012-12-18 21:22:11.000 2012-12-18 21:22:11.000
152649 NODE0000 C0000000 10 10 2012-12-18 21:19:58.000 2012-12-18 21:19:58.000
152638 NODE0000 C0000000 9 9 2012-12-18 20:40:06.000 2012-12-18 20:40:06.000
152520 NODE0000 C0000000 8 8 2012-12-18 17:15:48.000 2012-12-18 17:15:48.000

You need to execute the parameters in same sequence as mentioned in the above commands.

Can we protect data on non-global zones if the File System iDataAgent is installed only on the global zone?

Yes. We can protect file system data on non-global zones if the File System iDataAgent is installed only on the global zone. However, in order to enable consistent backups of application specific data on the non-global zones, you will need to install the corresponding application specific iDataAgent on the non-global zone.

How do we protect DB2 data on a non-global zone?

In order to enable consistent backups of DB2 data on a non-global zone, you need to install the DB2 iDataAgent on the non-global zone.

How are Command Line backup images displayed in the CommCell Console?

When you run DB2 command line offline/online backup jobs, the backup image is always displayed as online in the CommCell Console.

What are the Folders/Files Created and Changes Done During Install of this Agent?

Platforms Folders Created Files Created Other changes
Linux None None Symbolic links to Galaxy libraries under $DB2_HOME/sqllib/lib directory
Solaris None None Symbolic links to Galaxy libraries under $DB2_HOME/sqllib/lib directory
AIX None None Symbolic links to Galaxy libraries under $DB2_HOME/sqllib/lib directory

WHAT DO I DO WHEN My DB2 V10 Online GUI Backup failS because the specified DB2 configuration parameter is discontinued?

If you upgraded DB2 V9 to V10 or are using DB2 V10 in R90 with Service Pack 8 or lower, you need to install Service Pack 9.

In DB2 V10 and higher, database configurations parameters (LOGRETAIN & USEREXIT) have been replaced with LOGARCHMETH1. You need to install SP9 in order to support DB2 V10 and higher.

Can we use USER EXIT method instead of LOGARCHMETH1 Vendor method to backup DB2 log files?

Yes. You can use use USER EXIT method instead of LOGARCHMETH1 Vendor method to backup DB2 log files. However, this method is not commonly used and hence is deprecated.

Use the following steps to set the required parameters:

1. From the DB2 Console, type the command to set the USEREXIT parameter. db2 update database configuration for <database name> using USEREXIT on
2. Run Db2_install.sh from the following location:

<install path>/iDataAgent/

Example:

/opt/Calypso/iDataAgent>./Db2_install.sh