Setting the DB2 MultiNode Configuration Parameters

Each DB2 MultiNode 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, verify that no applications are currently using the database.

Note

After you modify the LOGARCHMETH1parameter, you must perform an offline full backup. You must deactivate, and then reactivate the database for all other configuration changes.

Use the following Commvault parameters when you use the DB2 VENDOROPT, LOGARCHOPT1 and TRACKMOD parameters.

Parameter

Description

database_name

The DB2 database name

CvClientName

The name of the client in the CommCell Console that corresponds to the database partition number This value is in the second column of the DB2 node configuration file (db2nodes.cfg).

CvInstanceName

The name of the Commvault installed instance. By default, this value is Instance001.

software_install_path

The path where the agent software is installed.

CvDpfClientName

The DB2 MultiNode pseudo-client in the CommCell Console.

n

(DBPARTITIONNUM)

The DB2 Node Number. This does not apply to DB2 pureScale. Get this value by looking at column 1 in the db2nodes.cfg file.

Example

dcat db2nodes.cfg
 0 db2dpfvm1 0 
 1 db2dpfvm1 1 
 2 db2dpfvm3 0 
 3 db2dpfvm4 0

Automatically Updating DB2 DPF Parameters

You can automatically update the DB2 DPF parameters using the Db2_config.sh script on Unix to perform backup and restore operations.

The following DB2 parameters are modified:

  • LOGARCHMETH1

  • LOGARCHOPT1

  • VENDOROPT

  • TRACKMOD to ON

The following table defines the parameters for the Db2_config.sh script.

Parameter

Description

Required

Database name

The name of the DB2 database. This is required.

Yes

Client name

The DB2 MultiNode pseudo-client name in the CommCell Console.

Yes

Commvault_Instance

The name of the Commvault instance. If you do not specify this parameter, by default, the Commvault software uses Instance001.

No

This script is available in software_installation_directory/iDataAgent on the UNIX client. You can use the script to set the DB2 DPF database configurations to use Commvault DB2 Multinode iDataAgent to perform data backup, log backup and log archival. This script also checks if the instance user has read/write permissions to the Archive, Retrieve, and Audit error directories.

  1. Go to the DB2 Agent directory to locate the Db2_config.sh utility.

  2. Run the following command as a DB2 instance user who is added to the UNIX group of Commvault:

    Db2_config.sh -d <dbname> -c <Multinode Client Name> [-i <Commvault_instance>]

Note

If you update the LOGARCHOPT1 parameters, you must restart the database after running this script.

Procedure

Set the LOGARCHOPT1 Parameter

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

    DB2 DPF

    You must run this command on each DB2 partition number node.

    db2 update db cfg for database_name DBPARTITIONNUM (n) using LOGARCHOPT1 "'CvClientName=DB2ClientName, CvInstanceName=InstanceName,CvDpfClientName=DB2MultiNode_PesudeoClientName'"

    DB2 pureScale

    db2 update db cfg for database_name using LOGARCHOPT1 "'CvInstanceName=InstanceName,CvDpfClientName=DB2MultiNode_PesudeoClientName'"

Set the VENDOROPT Parameter

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

    DB2 DPF

    You must run this command on each DB2 partition number node.

    db2 update db cfg for database_name DBPARTITIONNUM (n) using VENDOROPT "'CvClientName=DB2ClientName, CvInstanceName=InstanceName,CvDpfClientName=DB2MultiNode_PesudeoClientName'"

    DB2 pureScale

    db2 update db cfg for database_name using VENDOROPT "'CvInstanceName=InstanceName,CvDpfClientName=DB2MultiNode_PesudeoClientName'"

Enable Delta and Incremental Backups

Note

The TRACKMOD configuration parameter requires a full offline backup, or a full online backup in order to have a successful incremental backup or delta backup.

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

DB2 DPF

You must run this command on each DB2 partition number node.

db2 update database configuration for database_name DBPARTITIONNUM (n) using TRACKMOD on

DB2 pureScale

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 software deletes the log files from the threshold directory after a successful backup. 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 after the log files are transferred to tape, the software deletes the log files from the threshold directory.

You can change the log threshold. For more information, see Modifying the Threshold for Log Backups. We recommend that you set the value to 25 so that you can make optimal use of your resources.

Set this value to 1 to trigger the software to immediately perform a backup of each archive log, and then move the backup directly to media without transferring the file to the threshold directory.

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

    You must run this command on each DB2 partition number node.

    db2 update db cfg for database_name DBPARTITIONNUM (n) using LOGARCHMETH1 "'VENDOR:software_install_path/libDb2Sbt.so'"

    For DB2 pureScale with LOGARCHMETH1

    db2 update db cfg for database_name using LOGARCHMETH1 "'VENDOR:software_install_path/libDb2Sbt.so'

Examples

DB2 DPF

The following table defines the parameter values for the example.

Parameter

Value

Database name

TESTDB

CommCell Console pseudo-client name

DB2DPF_PART1051

Instance name

Instance001

VENDOR library

/opt/commvault/Base/libDb2Sbt.so

sqllib/db2nodes.cfg file

NODE00 and NODE01 are part of the db2dpfvm1 server.

NODE002 is part of the db2dpfvm3 server.

NODE003 is part of the db2dpfvm4 server.

cat db2nodes.cfg
0 db2dpfvm1 0
1 db2dpfvm1 1
2 db2dpfvm3 0
3 db2dpfvm4 0

Run the following commands on each DB2 DPF node:

db2 update db cfg for TESTDB DBPARTITIONNUM 0 using LOGARCHMETH1 "'VENDOR:/opt/commvault/Base/libDb2Sbt.so'"
db2 update db cfg for TESTDB DBPARTITIONNUM 1 using LOGARCHMETH1 "'VENDOR:/opt/commvault/Base/libDb2Sbt.so'"
db2 update db cfg for TESTDB DBPARTITIONNUM 2 using LOGARCHMETH1 "'VENDOR:/opt/commvault/Base/libDb2Sbt.so'"
db2 update db cfg for TESTDB DBPARTITIONNUM 3 using LOGARCHMETH1 "'VENDOR:/opt/commvault/Base/libDb2Sbt.so'"
db2 update db cfg for TESTDB DBPARTITIONNUM 0 using LOGARCHOPT1 "'CvClientName=db2dpfvm1,CvInstanceName=Instance001,CvDpfClientName=DB2DPF_PART1051'"
db2 update db cfg for TESTDB DBPARTITIONNUM 1 using LOGARCHOPT1 "'CvClientName=db2dpfvm1,CvInstanceName=Instance001,CvDpfClientName=DB2DPF_PART1051'"
db2 update db cfg for TESTDB DBPARTITIONNUM 2 using LOGARCHOPT1 "'CvClientName=db2dpfvm3,CvInstanceName=Instance001,CvDpfClientName=DB2DPF_PART1051'"
db2 update db cfg for TESTDB DBPARTITIONNUM 3 using LOGARCHOPT1 "'CvClientName=db2dpfvm4,CvInstanceName=Instance001,CvDpfClientName=DB2DPF_PART1051'"
db2 update db cfg for TESTDB DBPARTITIONNUM 0 using VENDOROPT "'CvClientName=db2dpfvm1,CvInstanceName=Instance001,CvDpfClientName=DB2DPF_PART1051'"
db2 update db cfg for TESTDB DBPARTITIONNUM 1 using VENDOROPT "'CvClientName=db2dpfvm1,CvInstanceName=Instance001,CvDpfClientName=DB2DPF_PART1051'"
db2 update db cfg for TESTDB DBPARTITIONNUM 2 using VENDOROPT "'CvClientName=db2dpfvm3,CvInstanceName=Instance001,CvDpfClientName=DB2DPF_PART1051'"
db2 update db cfg for TESTDB DBPARTITIONNUM 3 using VENDOROPT "'CvClientName=db2dpfvm4,CvInstanceName=Instance001,CvDpfClientName=DB2DPF_PART1051'"
db2 update db cfg for TESTDB DBPARTITIONNUM 0 using TRACKMOD on 
 db2 update db cfg for TESTDB DBPARTITIONNUM 1 using TRACKMOD on 
 db2 update db cfg for TESTDB DBPARTITIONNUM 2 using TRACKMOD on 
 db2 update db cfg for TESTDB DBPARTITIONNUM 3 using TRACKMOD on

DB2 PureScale

The following table defines the parameter values for the example.

Parameter

Value

Database name

PSDB1

CommCell Console pseudo-client name

DB2pureScale_PS1051

Instance name

Instance001

VENDOR library

/opt/commvault/Base/libDb2Sbt.so

Run the following commands:

db2 update db cfg for PSDB1 using LOGARCHMETH1 "'VENDOR:/opt/commvault/Base/libDb2Sbt.so'" 
 db2 update db cfg for PSDB1 using LOGARCHOPT1 "'CvInstanceName=Instance001,CvDpfClientName= DB2pureScale_PS1051'" 
 db2 update db cfg for PSDB1 using VENDOROPT "'CvInstanceName=Instance001,CvDpfClientName= DB2pureScale_PS1051'" 
 db2 update db cfg for PSDB1 using TRACKMOD on

Loading...