Loading...

Setting the DB2 Configuration Parameters

Each DB2 database has its own configuration. To back up DB2 data successfully, you must enable the appropriate database configuration parameters. You must set these parameters based on the state of the database, the backup type, and/or the data type.

Before you change any configuration parameter, ensure that no applications are currently using the database. Also, consult your database administrator about the business requirements for the database.

Update the database configuration parameters when the DB2 agent is installed on a cluster, or when you have multiple CommCell Console instances.

Note: After you modify the LOGARCHMETH1 parameter, you must perform an offline full backup. When you do this, the DB2 software moves the database out of the state.

About This Task

When the DB2 instance is running on non-cluster configuration and you use the default SnapProtect instance (Instance001), you do not need to update the VENDOROPT and LOGARCHOPT1 parameters.

After you change the TRACKMOD database configuration parameter, run an offline full backup to update the parameter.

Use the following parameters when you use the VENDOROPT and LOGARCHOPT1 parameters.

Parameter Description
database_name The DB2 database name
CvClientName The name of the client in the CommCell Console

When you have a clustered environment, you must set this parameter to the virtual client name in the CommCell Console.

CvInstanceName The name of the SnapProtect installed instance
software_install_path The path where the agent software is installed

For non-Linux UNIX agents, use base64 for 64-bit machines and base32 for 32-bit machines.

For Linux, use base.

Procedure

Set the LOGARCHOPT1 Parameter

  • From the DB2 console, type the following command to set the LOGARCHOPT1 parameter:

    db2 update db cfg for database_name using LOGARCHOPT1"'CvClientName=CvClientName,CvInstanceName=CvInstanceName'"

    Example

    db2 update db cfg for test_db using LOGARCHOPT1"'CvClientName=testhost,CvInstanceName=Instance001'"

Set the VENDOROPT Parameter

  • From the DB2 console, type the following command to set the VENDOROPT parameter:

    db2 update db cfg for database_name using VENDOROPT"'CvClientName=CvClientName,CvInstanceName=CvInstanceName'"

    Example

    db2 update db cfg for test_db using VENDOROPT"'CvClientName=testhost,CvInstanceName=Instance001'"

Examples

Set the Parameter for Online Backups

From the DB2 console, type the following command to set the LOGARCHMETH1 database configuration parameter.

db2 update db cfg for new_db using LOGARCHMETH1 "'VENDOR:/opt/SnapProtect/Base64/libDb2Sbt.so'"

Set the Parameter for Delta or Incremental Backups

From the DB2 console, type the following command to set the TRACKMOD database configuration parameter:

Note: You must set the TRACKMOD database configuration parameter to 'on' when you run a full backup before the delta backup or incremental backup.

db2 update database configuration for database_name using TRACKMOD on

Set the Parameter for Log Backups

The SBT interface transfers the log files from the DB2 directory to the threshold directory that you defined when you installed the DB2 Agent. If you use the delete option, then the log files are deleted from the threshold directory. If you do not use the delete option, then the log files are kept in this directory. By default, the threshold directory can hold 1000 log files. If the threshold directory attempts to hold more than 1000 log files, then a command line backup for the log files starts automatically, and the log files are transferred to tape.

You can change the log threshold. For more information, see Modifying the Threshold for Log Backups.

  1. From the DB2 console, type the command to set the LOGARCHMETH1 database configuration parameter:

    db2 update database configuration for database_name using LOGARCHMETH1 "'VENDOR:<install path><shared library file>'"

    Example

    db2 update database configuration for database_name using LOGARCHMETH1 “'VENDOR:/opt/SnapProtect/Base/libDb2Sbt.so'”

Set the Parameter for a Cluster Setup

You need to set the DB2 database configuration parameter on both the physical nodes. If you have a cluster environment, use the virtual machine name instead of physical client name.

To back up any type of DB2 data, update the LOGARCHOPT1 and VENDOROPT database configuration parameters on both the physical nodes by entering the following commands:

  1. From the DB2 Console, type the command to set the LOGARCHOPT1 parameter:

    db2 update db cfg for database_name using LOGARCHOPT1"' CvClientName=Virtual_Machine_CvClientName,CvInstanceName=CvInstanceName'"

  2. Type the following command to set the VENDOROPT parameter:

    db2 update db cfg for database_name using VENDOROPT"' CvClientName=Virtual_Machine_CvClientName,CvInstanceName=CvInstanceName'"