Loading...

Configuration - DB2 Agent

Table of Contents

Configuration - Database Administrator Configuration

DB2 Parameter Configuration

DB2 Initial Configuration on the CommCell Console

Configuration - Database Administrator Configuration

Perform the following for DB2 database administrators that perform backup and restore operations:

  1. A DB2 user must have SYSADM, SYSCTRL, or SYSMAINT and DBADM privileges to run backup and restore operations. For more details, refer to the IBM Knowledge Center website.

    Initially, the user account credentials are provided during the instance configuration after the installation of the agent. You can subsequently change the user account information to access the DB2 database and application at the database instance level whenever the credentials are updated. The user which is specified at the DB2 instance level property can manage all databases under the DB2 instance; however, you can specify separate DB2 users for specific databases at the backup set level.

  2. Configure a CommCell user with agent management capabilities for the database administrator.

DB2 Parameter Configuration

You must update the following DB2 database parameters to configure and protect the DB2 database with Commvault:

LOGARCHMETH1

Use this parameter to specify the Commvault library that will be used to archive and manage the DB2 database log files.

LOGARCHOPT1

Use this parameter to enable the DB2 to communicate with Commvault storage system during the Log archive and retrieve operations.

VENDOROPT – vendor

Use this parameter to enable the DB2 to communicate with Commvault storage system during backup, restore, or load copy operations.

TRACKMOD

Enable this parameter to allow the incremental/delta backups.

Automatically Updating DB2 Parameters

You can automatically update DB2 parameters by using the Db2_config.sh script on Unix and the Db2_config.ps1 script on Windows to perform backups and restores.

The following DB2 parameters are modified:

  • LOGARCHMETH1
  • LOGARCHOPT1
  • VENDOROPT
  • LOGARCHMETH2 to OFF
  • TRACKMOD to ON

Note: In a clustered environment, the Db2_config.sh script on Unix or the Db2_config.ps1 script on Windows updates the DB2 database configuration parameters on the physical node only. You must manually update the CvClientName from the physical node name to the VM client name for the LOGARCHOPT1 and VENDOROPT parameters.

The following table defines the parameters for both scripts.

Parameter

Description

dbname

The name of the DB2 database. This is required.

Commvault_Instance

The name of the Commvault instance. This is optional. When you do not specify this parameter, the Commvault software uses Instance0001.

UNIX

This script is available in Commvault_path/iDataAgent on the UNIX client. This script can be used to set the DB2 database configurations to use Commvault DB2 on UNIX iDataAgent to perform a data backup on a single node DB2 Instance, 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. You must be a DB2 instance user and need to be added to the UNIX group of Commvault to run this script.

Synopsis

Db2_config.sh -d <dbname> [-i <Commvault_instance>]

  1. Go to the DB2 Agent directory to locate the Db2_config.sh utility.
  2. On the command line, type the following command.

    Db2_config.sh -d <dbname> [-i <Commvault_instance>]

Example:

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

Windows

This script is available in Commvault_path\Base on Windows clients. This script can be used to set the DB2 database configurations to use Commvault DB2 on the Windows iDataAgent to perform a data backup on a single node DB2 Instance, log backup and log archival. This script also checks if the instance user has read and write permissions to the Archive, Retrieve, and Audit error directories. You must be a DB2 instance user to run this script.

Synopsis

Db2_config.ps1 -d <dbname> [-i <Commvault_instance>]

Use the following steps to run this script from the DB2 command line prompt:

  1. On the Windows client computer command line, type the following command.

    qlogin -cs <commserve_name> -u <commcell_user_name> -p <commcell_login_password>

  2. Run the Windows PowerShell  from the DB2 command prompt window.
  3. Enable PowerShell script execution on the system:

    Set-ExecutionPolicy Unrestricted

  4. In the Commvault_path\Base directory, at the PowerShell prompt, type the following command.

    Db2_config.ps1 -d <dbname>

  5. At the PowerShell prompt, disable the PowerShell script execution on the system:

     Set-ExecutionPolicy Restricted

Interactively Updating the DB2 Parameters

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

Update the database configuration parameters when the DB2 agent is installed on a cluster or multiple instances of  Commvault are installed.

For more information, see Setting the DB2 Configuration Parameters.

DB2 Initial Configuration on the CommCell Console

You must perform the following tasks before you perform your first backup.

  1. Configure a Storage Retention Policy for backups.
  2. Discover the DB2 instances.
  3. Update the DB2 instances with the appropriate credentials for accessing the DB2 application.
  4. Configure the subclient storage policies.

Discovering DB2 Instances

Note: You must have DB2 Administrative privileges to configure the instances.

Use the following to discover all existing DB2 instances.

  1. From the CommCell Browser, expand Client Computers > client.
  2. Right-click DB2, point to All Tasks and then click Discover Instance.
  3. Click Yes to confirm the instance discovery.

Configuring the DB2 Instance

Configuring the DB2 Account

Modify the user account associated with the DB2 instance to access the DB2 application:

  1. Right-click the <DB2 Instance>, and then click Properties.
  2. On the General Tab of the Properties dialog box, under the DB2 User Account box, and click Change.
    1. Type the user name to access the DB2 application. For Windows clients, include the domain name along with the user name.
    2. In the Password box, type the password for the user account.
    3. In the Confirm Password box, retype the password for the user account.
    4. Click OK.

Configuring the Subclient Storage Policy

Configure the subclient storage policy for the instance:

  1. From the CommCell Browser, navigate to Client Computers |< Client >| DB2| <Instance> | <Backup_Set>.
  2. Right-click the <Subclient>, and then click Properties.
  3. On the Storage device tab of the Subclient Properties dialog box, click the Data Storage Policy tab and select the Storage Policy.

Discovering DB2 Databases (Backup Sets)

Discover the databases associated with the instance:

  1. From the CommCell Browser, navigate to Client Computers |< Client >| DB2| <Instance>.
  2. Right-click the <Instance>, and then click All Tasks > Discover Databases.

Backup sets with the name of the discovered databases are listed under the DB2 instance.

Last modified: 7/25/2019 4:08:48 AM