Loading...

Advanced Configuration - DB2 iDataAgent

Table of Contents

Understanding the CommCell Console

The DB2 iDataAgent uses the following logical entities to manage backup and restore operations from the CommCell Console.

Agent

Facilitates DB2 instance discovery.

Instance

Defines the DB2 instance. It includes one or more databases.

Backup Set

Defines the DB2 database to be backed up.

Subclient

Defines the DB2 database objects to be backed up.

Managing Instances

In the CommCell Console each DB2 instance references a group of databases. Hence it is necessary to discover the instances which can then be used to backup data. You can discover or add instances as described in the following sections:

Discovering Instances

You can manually discover the existing DB2 instances at any given point of time. All the existing DB2 instances on all the DB2 versions on this client can be discovered using this instance discovery operation. Following rules (related to storage policies are applicable for DB2 instances:

  • By default, a newly discovered DB2 instance inherits the storage policy from an existing DB2 instance in the client.

  • If there are no existing DB2 instances in the client prior to the discovery of a new DB2 instance, then the newly discovered DB2 instance inherits the storage policy from the File system's default subclient.

  • If there are no existing DB2 instances, and if there is no storage policy created for the default subclient of the File system, in such cases you have to manually select a storage policy for the DB2 instance.

  • After the DB2 instance is discovered from the CommCell Console, options including the DB2 instance name and DB2 home path are preset, but you must manually enter the DB2 user account.

Use the following steps to discover the DB2 instances:

  1. From the CommCell Browser, navigate to Client Computers | <Client>.
  2. Right-click DB2, point to All Tasks, and then click Discover Instances.
  3. In the confirmation dialog, click Yes.

Manually Adding an Instance

When instances are manually added, all options can be customized. Use the following steps to manually add an instance:

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

  1. In the Instance Name box, type the Instance name (up to 32 characters).
  2. In the HOME box, type the DB2 application install path. Alternatively, click Browse to select the DB2 install path (Home Directory), and click OK.
  3. Click Change.
  4. In the DB2 User Account box, type the user name to access the DB2 application on the client computer.
  5. In the Password box, type the password for the user account.
  6. In the Confirm Password box, retype the password, and then click OK.

  1. Click the Storage Device tab.
  2. In the Default Storage Policy box, select a storage policy name.
  3. Click the Log Backup tab.
  4. In the Storage Policy for All Log Files box, select a storage policy name.
  5. Click the Command Line Backup tab.
  6. In the Storage Policy for All Command line Backup box, select a storage policy name.
  7. Click OK.

Changing the Home Directory

DB2 HOME directory refers to the location where the DB2 application resides. When instances are discovered, the home path is automatically assigned to the instance. However, you can modify the home path location for an instance at any point of time. Use the following steps to configure the DB2 HOME directory:

  1. From the CommCell Browser, navigate to Client Computers | <Client> |DB2.
  2. Right-click the <Instance>, and then click Properties.
  3. In the HOME box, type the path to the DB2 Home directory. Alternatively, you can click Browse to locate the path.
  4. Click OK.

Managing Backup Sets

Once you have discovered the instance, you can also create a backup set for each of the discovered instance in order to perform backup and restore operations on the database. In the CommCell Console each backup set references a DB2 database. Discover the databases prior to performing backup and restoring operations on the database.

Enabling Automatic Database Discovery

When automatic database discovery is enabled, the existing DB2 databases are discovered automatically as follows:

  • Every 168 hours
  • Whenever the Communications Service (GxCVD) is restarted (such as after a computer reboot)

Make sure that the DB2 Instance is configured to ensure that the databases are discovered. See Configuring Instances for more information.

This capability ensures that all databases are accounted for on a regular basis for backups. Use the following steps to enable automatic database discovery:

  1. From the CommCell Browser, navigate to Client Computers | <Client>.
  2. Right-click DB2, and then click Properties.
  3. Select the Enable Database Discovery check box.
  4. Click OK.

Setting the Automatic Discovery Frequency

When database discovery is enabled, DB2 databases are automatically discovered every 168 hours or whenever the Communications Service (GxCVD) is restarted. Use the following steps to modify this default discovery time interval.

  1. From the CommCell Browser, navigate to Client Computers.
  2. Right-click the <Client>, and then click Properties.
  3. Click Advanced.
  4. Click the Additional Settings tab.
  5. Click Add.
  6. In the Name box, type nDBDISCOVERYINTERVAL. The Additional Settings dialog box will automatically display the Category, Type and Value of this Additional Setting.
  7. In the Value box, type the time interval to discover databases.

    For example, to discover databases for every two hours, type 2.

  8. Click OK.
  9. Click OK.

Manually Discovering Databases

In addition to automatic discovery, you can also discover databases manually at any given point of time. Use the following steps to manually discover the databases:

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

Creating a Backup Set

Use the following steps to create a new backup set for an existing DB2 database.

  1. From the CommCell Browser, navigate to Client Computers | <Client> | DB2.
  2. Right-click the <Instance>, point to All Tasks, and then click Create New Backup Set.

  1. Select the Database under the Available DB Names, and then click the arrow button to move it into Selection box.
  2. In the Storage Policy for all Log Files box, select the storage policy name.
  3. Click OK.

Configuring User Accounts for Backups

For information about how to configure the DB2 user accounts, see DB2 and DB2 MultiNode iDataAgents.

Managing Subclients

Before you back up data, you must define the data that you want to back up and how this data should be backed up. This is done by creating one or more subclients for the database that you are backing up. For the DB2 iDataAgent, a subclient defines whether:

  • Entire database or only a subset of objects within the database will be backed up.
  • Data intended for backup will be backed up with the DB2 database online or offline.
  • Log files should be included in the database backup for online backups.

Depending on your needs, you can create multiple subclients to backup an entire database, individual table spaces, multiple table spaces, and log files with the database either online, offline or log only.

Once you create a new backup set for a database, a default subclient is automatically created for the backup set. Since each DB2 backup set is designed to represent a single DB2 database, the default subclient that is created for a backup set will include the entire DB2 database for that backup set. However, you can also create user-defined subclients to distribute some of the database content. Any content that you do not distribute to the user-defined subclients will remain in the default subclient.

If a new database object is added to the database, and if none of the subclients contain that database object, then that object is assigned to the content of the default subclient.

Creating a Subclient for Offline Backups

During an offline backup, the database is shutdown and is not available for use. Since incremental backups require access to various tablespaces and datafiles, it is always recommended that you perform a full backup of the database when it is offline. The full backup includes all the data files and tablespaces for the database. In order to backup the database when it is offline, you need to create a separate user-defined subclient for offline backup. Note that when performing the offline backups, all applications associated with the DB2 database will be terminated automatically. Use the following steps to create a subclient for offline backups.

  1. From the CommCell Browser, navigate to Client Computers > client  > DB2 > instance.
  2. Right-click the backupset, point to All Tasks and then click New Subclient.

    The Create New Subclient dialog box appears.

  3. On the General tab, in the Subclient name box, enter a name for the subclient.
  4. On the Content tab:
    • Select the Data check box.
    • Select the Offline Database option.
  5. On the Storage Device tab from the Data Storage Policy list, select the storage policy that the software uses for data backups.
  6. Optional: Select the subclient options.
    Expand All

    Run scripts before or after the backup

    You can choose to run the post-process script even if the backup job failed.

    To pass the database instance name to the script, see Passing the Instance Name to Pre and Post Scripts for Databases.

    On the Pre/Post Process tab:

    1. In the PreBackup Process box, type the full path name for the script.
    2. In the PostBackup Process box, type the full path name for the script.
    3. To run the post backup process regardless of the job's outcome, select the Run Post Process for all attempts check box.

    Use compression to optimize backup storage

    On the Advanced Options tab, select the Use Db2 compression check box.

    When you select this option, the SnapProtect software applies the DB2 compression feature to all the backups for this subclient.

    Fore more information about DB2 compression, go to the DB2 website, compression and storage.

    Use DB2 DEDUP DEVICE

    When this is enabled, the DB2 deduplication parameter DEDUP_DEVICE is used. This feature is available starting on DB2 version 9.7 with FixPack 3.

    For additional information about the DB2 DEDUP_DEVICE parameter, go to the DB2 Knowledge Center, DEDUP_DEVICE.

    On the Advanced Options tab, select the Use Dedupe Device check box.

  7. Click OK to close the Create New Subclient dialog box.

Creating a Subclient for Online Backups

In some environments, it may not be possible to bring down the entire database to perform an offline backup. In such situations, you can choose online backups, where the database will be up and running during the backup.

You can perform either a full backup or incremental/delta backup of the database when it is online. Since full backup includes all the data files, table spaces and logs, it is very time consuming, hence you can plan for a full online backup less frequently (say, on weekly basis). On the other hand, incremental/delta backups includes the data and logs that have been changed after the last full/or last incremental backup, they are faster and can be performed more frequently (say, on a daily basis).

  1. From the CommCell Browser, expand Client Computers > client > DB2 > Instance.
  2. Right-click the backup_set, point to All Tasks and then click Create Subclient.

    The Create New Subclient dialog box appears.

  3. In the General tab, in the Subclient name box, enter a name for the subclient.
  4. On the Content tab:
    1. Select the Data check box.
    2. Select Online Database option.
    3. Optional: To exclude the DB2 log files from the backup image on a DB2 version that is 9.7 or later, select the Exclude Logs from Backup Image check box.
  5. On the Storage Device tab from the Data Storage Policy list, select the storage policy that the software uses for data backups.
  6. On the Advanced Options tab, select the Backup Log Files check box.
  7. On the Advanced Options tab, select the backup log options.
    Option Description
    Delete Log Files After check box Delete the logs after the backup.

    This deletes the logs from the archive log path. You can optionally delete the logs after a specified time period. For more information, see Setting the Time Used for Deleting Older Archive Logs.

    Disable Switch Current Log check box Disable the log switch.

    When the switch is on, the current redo log file is closed (even if it is not filled up completely) and the next redo log file is used for writing using a log switch. The closed redo log file is then archived during the log phase.

  8. Optional: Select the subclient options.
    Expand All

    Run scripts before or after the backup

    You can choose to run the post-process script even if the backup job failed.

    To pass the database instance name to the script, see Passing the Instance Name to Pre and Post Scripts for Databases.

    On the Pre/Post Process tab:

    1. In the PreBackup Process box, type the full path name for the script.
    2. In the PostBackup Process box, type the full path name for the script.
    3. To run the post backup process regardless of the job's outcome, select the Run Post Process for all attempts check box.

    Use compression to optimize backup storage

    On the Advanced Options tab, select the Use Db2 compression check box.

    When you select this option, the SnapProtect software applies the DB2 compression feature to all the backups for this subclient.

    Fore more information about DB2 compression, go to the DB2 website, compression and storage.

    Use DB2 DEDUP DEVICE

    When this is enabled, the DB2 deduplication parameter DEDUP_DEVICE is used. This feature is available starting on DB2 version 9.7 with FixPack 3.

    For additional information about the DB2 DEDUP_DEVICE parameter, go to the DB2 Knowledge Center, DEDUP_DEVICE.

    On the Advanced Options tab, select the Use Dedupe Device check box.

  9. Click OK to close the Create New Subclient dialog box.

After you have the backup image, you can use the DB2 backup check command (db2chkbkp) command to verify that you can restore the backup image. For additional information, go to the DB2 Knowledge Center, db2chkbkp.

Creating a Subclient for Data Only Backups

By default, the default subclient includes both data and the logs for the backup. However, if you want to backup only the data, you can create a separate subclient for data backups. Use the following steps to create subclient for data only backups:

  1. From the CommCell Browser, expand Client Computers > client > DB2 > Instance.
  2. Right-click the backup_set, point to All Tasks and then click New Subclient.

    The Create New Subclient dialog box appears.

  3. On the General tab, in the Subclient Name box, enter a name for the subclient.
  4. On the Content tab:
    1. Select the Data check box.
    2. Select the Online Subset option.
    3. Click Yes on the Warning dialog box.
    4. From the Current Database View, select the database objects you want  to include.
  5. On the Storage Device tab from the Data Storage Policy list, select the storage policy that the software uses for data backups.
  6. Optional: Select the subclient options.
    Expand All

    Run scripts before or after the backup

    You can choose to run the post-process script even if the backup job failed.

    To pass the database instance name to the script, see Passing the Instance Name to Pre and Post Scripts for Databases.

    On the Pre/Post Process tab:

    1. In the PreBackup Process box, type the full path name for the script.
    2. In the PostBackup Process box, type the full path name for the script.
    3. To run the post backup process regardless of the job's outcome, select the Run Post Process for all attempts check box.

    Use compression to optimize backup storage

    On the Advanced Options tab, select the Use Db2 compression check box.

    When you select this option, the SnapProtect software applies the DB2 compression feature to all the backups for this subclient.

    Fore more information about DB2 compression, go to the DB2 website, compression and storage.

    Use DB2 DEDUP DEVICE

    When this is enabled, the DB2 deduplication parameter DEDUP_DEVICE is used. This feature is available starting on DB2 version 9.7 with FixPack 3.

    For additional information about the DB2 DEDUP_DEVICE parameter, go to the DB2 Knowledge Center, DEDUP_DEVICE.

    On the Advanced Options tab, select the Use Dedupe Device check box.

  7. Click OK to close the Create New Subclient dialog box.

Creating a Subclient to Backup Individual Tablespaces

In addition to backing up the entire DB2 database, you can also backup specific tablespaces which frequently change.

  1. From the CommCell Browser, expand Client Computers > client > DB2 > Instance.
  2. Right-click the backup_set, point to All Tasks and then click New Subclient.

    The Create New Subclient dialog box appears.

  3. On the General tab, in the Subclient name box, enter a name for the subclient.
  4. On the Content tab:
    • Select the Data check box.
    • Select the mode to backup the database in.

      To perform the backup when the database in online, select the Online Database option.

      To perform the backup when the database in offline, select the Offline Database option.

    • To exclude the DB2 log files from an online backup image on a DB2 version that is 9.7 or later, select the Exclude Logs from Full Backup check box.
  5. On the Storage Device tab from the Data Storage Policy list, select the storage policy that the software uses for data backups.
  6. On the Advanced Options tab, When you choose the option to back up the database when it is online, select the Backup Log Files check box.
  7. On the Advanced Options tab, when you choose the option to back up the database when it is online, select the backup log options.
    Option Description
     Delete Log Files After check box Delete the logs after the backup.

    This deletes the logs from the archive log path. You can optionally delete the logs after a specified time period. For more information, see Setting the Time Used for Deleting Older Archive Logs.

    Disable Switch Current Log check box Disable the log switch.

    When the switch is on, the current redo log file is closed (even if it is not filled up completely) and the next redo log file is used for writing using a log switch. The closed redo log file is then archived during the log phase.

  8. Optional: Select the subclient options.
    Expand All

    Run scripts before or after the backup

    You can choose to run the post-process script even if the backup job failed.

    To pass the database instance name to the script, see Passing the Instance Name to Pre and Post Scripts for Databases.

    On the Pre/Post Process tab:

    1. In the PreBackup Process box, type the full path name for the script.
    2. In the PostBackup Process box, type the full path name for the script.
    3. To run the post backup process regardless of the job's outcome, select the Run Post Process for all attempts check box.

    Use compression to optimize backup storage

    On the Advanced Options tab, select the Use Db2 compression check box.

    When you select this option, the SnapProtect software applies the DB2 compression feature to all the backups for this subclient.

    Fore more information about DB2 compression, go to the DB2 website, compression and storage.

    Use DB2 DEDUP DEVICE

    When this is enabled, the DB2 deduplication parameter DEDUP_DEVICE is used. This feature is available starting on DB2 version 9.7 with FixPack 3.

    For additional information about the DB2 DEDUP_DEVICE parameter, go to the DB2 Knowledge Center, DEDUP_DEVICE.

    On the Advanced Options tab, select the Use Dedupe Device check box.

  9. Click OK to close the Create New Subclient dialog box.

After you have the backup image, you can use the DB2 backup check command (db2chkbkp) command to verify that you can restore the backup image. For additional information, go to the DB2 Knowledge Center, db2chkbkp.

Creating a Subclient for Table Level Restores

You can create a subclient for a restore of one or more database tables. You can restore the tables without affecting other database objects.

Best Practice: If you want to use the table level restore, create one subclient with the options hat are specified in this procedure for a backup set. This ensures that the backup image will be the right type for a table level restore.

Before You Begin

  1. Create user-defined tables on the DB2 database.
  2. Create a backup set for the DB2 database.
  3. Set the DB2 DB2_CREATE_DB_ON_PATH environment variable to YES to enable the instance creation on the auxiliary database. On the command line type the following:

    db2stop
    DB2 DB2_CREATE_DB_ON_PATH=YES
    db2start

Procedure

  1. From the CommCell Browser, expand Client Computers > client > DB2 > Instance.
  2. Right-click the backup_set, point to All Tasks and then click Create Subclient.

    The Create New Subclient dialog box appears.

  3. In the General tab, in the Subclient name box, enter a name for the subclient.
  4. On the Content tab:
    • Select the Data check box.
    • Select the mode to backup the database in.

      To perform the backup when the database in online, select the Online Database option.

      To perform the backup when the database in offline, select the Offline Database option.

    • Optional: To exclude the DB2 log files from the online backup image on a DB2 version that is 9.7 or later, select the Exclude Logs from Backup Image check box.
  5. On the Storage Device tab from the Data Storage Policy list, select the storage policy that the software uses for data backups.
  6. On the Advanced Options tab, select the Backup Log Files check box when you choose the Online Database option.
  7. On the Advanced Options tab, select the options for this subclient.
    1. Select the Enable Table Browse check box to allow table level restores.
    2. Optional: When you choose the option to back up the database when you choose the Online Database option., select the backup log options.
    Option Description
     Delete Log Files After check box Delete the logs after the backup.

    This deletes the logs from the archive log path. You can optionally delete the logs after a specified time period. For more information, see Setting the Time Used for Deleting Older Archive Logs.

    Disable Switch Current Log check box Disable the log switch.

    When the switch is on, the current redo log file is closed (even if it is not filled up completely) and the next redo log file is used for writing using a log switch. The closed redo log file is then archived during the log phase.

  8. Optional: Select the subclient options.
    Expand All

    Run scripts before or after the backup

    You can choose to run the post-process script even if the backup job failed.

    To pass the database instance name to the script, see Passing the Instance Name to Pre and Post Scripts for Databases.

    On the Pre/Post Process tab:

    1. In the PreBackup Process box, type the full path name for the script.
    2. In the PostBackup Process box, type the full path name for the script.
    3. To run the post backup process regardless of the job's outcome, select the Run Post Process for all attempts check box.

    Use compression to optimize backup storage

    On the Advanced Options tab, select the Use Db2 compression check box.

    When you select this option, the SnapProtect software applies the DB2 compression feature to all the backups for this subclient.

    Fore more information about DB2 compression, go to the DB2 website, compression and storage.

    Use DB2 DEDUP DEVICE

    When this is enabled, the DB2 deduplication parameter DEDUP_DEVICE is used. This feature is available starting on DB2 version 9.7 with FixPack 3.

    For additional information about the DB2 DEDUP_DEVICE parameter, go to the DB2 Knowledge Center, DEDUP_DEVICE.

    On the Advanced Options tab, select the Use Dedupe Device check box.

  9. Click OK to close the Create New Subclient dialog box.

After you have the backup image, you can use the DB2 backup check command (db2chkbkp) command to verify that you can restore the backup image. For additional information, go to the DB2 Knowledge Center, db2chkbkp.

Creating a Subclient for Log Backups

Archive logs are required to recover database transactions that have been lost due to an operating system or disk failure. You can apply these archive logs to an online backup in order to recover a database.

The default subclient includes data and logs.

A log backup is always a full backup.

Best Practice: Create a separate subclient for log backups.

Before You Begin

Procedure

  1. From the CommCell Browser, expand Client Computers > client > DB2 > Instance.
  2. Right-click the backup_set, point to All Tasks and then click Create Subclient.

    The Create New Subclient dialog box appears.

  3. In the General tab, in the Subclient name box, enter a name for the subclient.
  4. On the Content tab, clear the Backup Data check box.
  5. On the Storage Device tab from the Data Storage Policy list, select the storage policy that the software uses for data backups.
  6. On the Advanced Options tab, select the options for this subclient
    1. Select the Backup Log Files check box.
    2. Optional: To use the DB2 DEDUP_DEVICE parameter, select the Use Dedupe Device check box and set the Parallelism value to 0.

      When this is enabled, the DB2 deduplication parameter DEDUP_DEVICE is used. This feature is available starting on DB2 version 9.7 with FixPack 3.

      For additional information about the DB2 DEDUP_DEVICE parameter, go to the DB2 Knowledge Center, DEDUP_DEVICE.

    3. Optional: To delete the logs after the backup, select the Delete Log Files After check box.

      This deletes the logs from the archive log path. You can optionally delete the logs after a specified time period. For more information, see Setting the Time Used for Deleting Older Archive Logs.

    4. Optional: To disable the log switch, select the Disable Switch Current Log check box.

      When the switch is on, the current redo log file is closed (even if it is not filled up completely) and the next redo log file is used for writing using a log switch. The closed redo log file is then archived during the log phase.

  7. Click OK to close the Create New Subclient dialog box.

Enabling Automatic Backup of Archive Logs

You can enable automatic backups of archive logs when you use the SnapProtect VENDOR library parameters (SBT Interface). When the logs that are accumulated in the log archive path reach the threshold value, the logs are automatically backed up.

By default, the archive log path given at the time of installation holds 1000 archive logs. You can change the threshold for all databases for a client, or a specific database.

Use the following steps to enable automatic log backups:

  1. Type the following command to set the LOGARCHMETH1 parameter to VENDOR.

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

  2. Type the following command to set the LOGARCHOPT1 parameter.

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

    where

    <database_name> is the name of the DB2 database

    <CvClientName> identifies the name of the computer where the DB2 iDataAgent is installed and this name must be same as in CommCell Console

    <CvInstanceName> identifies the name of DB2 iDataAgent instance associated with the appropriate CommServe

    <software_install_path> is the install path for the agent software; for Unix (except Linux), use base64 for 64-bit machines and base for 32-bit machines, for Linux use base for 32-bit and 64-bit machines.

Once the archive logs reach this threshold value, automated log backup gets started.

Change the threshold value to start an automated log backup:

Note: You cannot enable the option to have the software delete the logs that are older than a specified value after the logs are backed up when you set the automated log backup threshold. For informataion about how to configure the option to have the software delete the logs, see Setting the Time Used for Deleting Older Archive Logs.

  1. From the CommCell Browser, expand Client Computers > client >.
  2. In the Client Properties dialog box, click the Additional Settings tab and then click Add.
  3. In the Add Additional Settings dialog box, enter the details for the additional setting:
    1. Set the threshold.
    2. In the Category box, select Db2Agent.
    3. In the Type box, select String.
    4. In Value box, type the number of archive logs that kick off an automated log backup
    5. Click OK to close the Add Additional Settings dialog box.
  4. Click OK to close the Client Properties dialog box.

Modifying the Archive Path

Once the DB2 online log files are full, they are moved to DB2 Archive folder. By default, at the time of installation of DB2 iDataAgent, a single parent location is specified for storing Archive files, Audit Error logs and files that are used in DB2 recovery process. However, if you want, you can change the Archive path after the installation of DB2 iDataAgent.

Note: In a multi-instance and multi-database configuration, you can configure multiple archive paths by configuring this additional setting for each instance and database.

  • To the DB2 client, add the additional setting as shown in the following table.

    For instructions on how to add additional settings from the CommCell Console, see Add or Modify an Additional Setting.

    Property Value
    Name
    • To set the archive path when there is one database in the configuration, in the Name box, type sDB2_ARCHIVE_PATH.
    • To set the archive path in a multi-instance and multi-database configuration, in the Name box, type <db2 instance name>_<db name>_sDB2_ARCHIVE_PATH.

      Note: The DB2 instance name (db2_instance_name) and the DB2 database name (db_name) must be in upper case.

    Category Db2Agent
    Type String
    Value <software_install_directory>\archive_path

Modifying the Audit Error Path

By default, at the time of installation of DB2 iDataAgent, a single parent location is specified for storing Audit Error logs, Archive files and files that are used in DB2 recovery process. However, if you want, you can change the Audit Error path after the installation of DB2 iDataAgent.

Note: In a multi-instance and multi-database configuration, you can configure multiple archive paths by configuring this additional setting for each instance and database.

  • To the DB2 client, add the additional setting as shown in the following table.

    For instructions on how to add additional settings from the CommCell Console, see Add or Modify an Additional Setting.

    Property Value
    Name
    • To set the audit error path when there is one database in the configuration, in the Name box, type sDB2_AUDIT_ERROR_PATH.
    • To set the audit error path in a multi-instance and multiple database configuration, in the Name box, type <db2 instance name>_<db name>_sDB2_AUDIT_ERROR_PATH.

      Note: The DB2 instance name (db2_instance_name) and the DB2 database name (db_name) must be in upper case.

    Category Db2Agent
    Type String
    Value <software_install_directory>\audit_path

Modifying the Retrieve Path

Retrieve path is the location where the files that are required for DB2 recovery process are stored. By default, at the time of installation of DB2 iDataAgent, a single parent location is specified for storing the files the are used in DB2 recovery process, Audit Error logs and Archive files. However, if you want, you can change the Retrieve path after the installation of DB2 iDataAgent. Use the following steps for modifying the path to the Retrieve folder:

Note: In a multi-instance and multi-database configuration, you can configure multiple archive paths by configuring this additional setting for each instance and database.

  • To the DB2 client, add the additional setting as shown in the following table.

    For instructions on how to add additional settings from the CommCell Console, see Add or Modify an Additional Setting.

    Property Value
    Name
    • To set the retrieve path when there is one database in the configuration, in the Name box, type sDB2_RETRIEVE_PATH.
    • To set the retrieve path in a multi-instance and multiple database configuration,  in the Name box, type <db2 instance name>_<db name>_sDB2_RETRIEVE_PATH.

      Note: The DB2 instance name (db2_instance_name) and the DB2 database name (db_name) must be in upper case.

    Category Db2Agent
    Type String
    Value <software_install_directory>\retrieve_path

Setting the Database 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, backup type, and/or data type.

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

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

  • 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'"

  • 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'"

Note: On a cluster setup, you need to update the LOGARCHOPT1 and VENDOROPT database configuration parameters on a virtual machine name instead of physical client name.

Updating VENDOROPT and LOGARCHOPT1 is optional, if the DB2 instance is running on non cluster configuration and default SnapProtect instance (Instance001).

The CvClientName and CvInstanceName parameters are case sensitive.

The CvClientName must match with the client name configured in the CommCell Console.

Note: When you modify the LOGARCHMETH1 parameter, you must perform an offline full backup. DB2 will move the database out of the BACKUP_PENDING state.

Automatically Updating DB2 Parameters

For informataion about automatically updating DB2 parameters, see DB2 Parameter Configuration

Manually Updating DB2 Parameters

For Online Backups

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

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

For Delta or Incremental Backups

From the DB2 Console, type the following commands in the below mentioned sequence to perform incremental or delta DB2 backups.

db2 update db cfg for <database name> using TRACKMOD on
db2 update db cfg for <database name> using LOGARCHMETH1 “VENDOR:/opt/SnapProtect/Base/libDb2Sbt.so”

You need to set the TRACKMOD database configuration parameter ON and run a full offline database backup to perform a successful delta/incremental backup.

For Log Backups

Enter the following command to back up DB2 log files:

db2 update db cfg for <database name> using LOGARCHMETH1 VENDOR:<install path><shared library file>

Example :

db2 update db cfg for <database name> using LOGARCHMETH1 “'VENDOR:/opt/SnapProtect/Base/libDb2Sbt.so'”

where:

<install path> identifies the base install directory

<shared library file> identifies the name of the shared library file libDB2Sbt.* (where * identifies the file extension, which will vary per the operating system)

Whenever you change the TRACKMOD database configuration parameter, be sure to run a full offline database backup. Otherwise, the TRACKMOD parameter will not be updated.

With the SBT interface, log files are staged to an archive path, and an On Demand backup of the log files is performed when a certain threshold is reached. Alternatively, the user can submit a backup request for any number of log files from the CommCell Console.

The SBT interface program takes the logs from the DB2 directory and transfers them first to the threshold directory that was defined during the DB2 iDataAgent install and then to tape. If you subsequently use the Delete option, the logs are deleted from the threshold directory; otherwise, the logs are kept in this directory. By default, the threshold directory can hold 1000 logs. If the threshold directory attempts to hold more than 1000 logs, a command line backup for the logs starts automatically, and the logs are transferred to tape.

Control the threshold value by adding the sDb2ThresholdALFN <number> Additional Setting to the Db2Agent registry, where <number> indicates the number of logs you want to hold in the threshold directory before the logs will automatically start backing up to tape. Otherwise, by default, the threshold directory can hold 1000 logs.

Configuring the LOGARCHMETH1 Parameter to DISK

By default, SnapProtect sets the DB2 configuration parameter LOGARCHEMETH1 to the VENDOR library. For informataion about the default values for the vendor library, see Vendor Library.

You can configure the  DB2 configuration parameter LOGARCHEMETH1 to send the logs to the DISK when the DISK directory path is the same as the DB2 Archive Log path. For more information, see Modifying the Archive Path.

Note:  If the parameter is set to DISK and the path is different from the Archive Log Path the log backup jobs go to a pending state.

Before You Begin

Configure the additional setting to all the software to use the DISK value.

  1. From the CommCell Browser, right-click the client, and then click Properties:
  2. In the Client Properties dialog box, click the Additional Settings tab and then click Add.
  3. In the Add Additional Settings dialog box, enter the details for the additional setting:
    1. In the Name box, type sALLOWLOGARCHMETH1TODISK.
    2. In the Category box, select Db2Agent.
    3. In the Type box, select String.
    4. In the Value box, type Y.
    5. Click OK to close the Add Additional Settings dialog box.
  4. Click OK to close the Client Properties dialog box.

Procedure

  • Set the LOGARCHMETH1 parameter. On the command line, type the following, substituting archve_log_path with your value:

db2 "update db cfg using LOGARCHMETH1 'DISK:<archive_log_path>'"

Configuring Parameters on a Cluster Setup

You need to configure the DB2 database configuration parameter on both the physical nodes. Enter the virtual machine name instead of physical client name on a cluster setup when you configure DB2 database configuration parameters.

To back up any type of DB2 data online or offline, 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=<CvClientName>,CvInstanceName=<CvInstanceName>'"

  2. Type the command to set the VENDOROPT parameter.

    db2 update db cfg for <database name> using VENDOROPT"' CvClientName=<CvClientName>,CvInstanceName=<CvInstanceName>'"

Configuring Parameters for Cross Database Restore

Use the following steps to restore an automatic storage (ASM) database using the DB2 command line:

  1. At the DB2 command prompt, run the following command to create a new database on the destination computer.

    db2 CREATE DATABASE <new_db>

  2. Run the following command to update the db2 configuration.

    The <destination software installation path> should be <destination db2 database location> or storage path.

    db2 update db cfg for <new_db> using trackmod on
    db2 update db cfg for <new_db> using LOGARCHMETH1 "'VENDOR:/opt/SnapProtect/Base64/libDb2Sbt.so'"
    db2 update db cfg for <new_db> using VENDOROPT "'CvSrcDbName=source_db,CvClientName=MP_DB2_ibmaix07_Sras,
    CvInstanceName=Instance001'"
    db2 update db cfg for <new_db> using LOGARCHOPT1 "'CvSrcDbName=source_db,CvClientName=MP_DB2_ibmaix07_Sras,
    CvInstanceName=Instance001'"
    db2 restore db source_db load <source software install path>/Base/libDb2Sbt.so taken at 20080627113831 on <destination database location> into new_db REDIRECT

Use the following steps to restore an non-automatic storage database using the DB2 command line:

  1. At the DB2 command prompt, run the following command to create a new database on the destination computer.

    db2 CREATE DATABASE <new_db>

  2. Run the following command to update the db2 configuration:

    db2 update db cfg for <new_db> using trackmod on
    db2 update db cfg for <new_db> using LOGARCHMETH1 "'VENDOR:/opt/SnapProtect/Base64/libDb2Sbt.so'"
    db2 update db cfg for <new_db> using VENDOROPT "'CvSrcDbName=source_db,CvClientName=MP_DB2_ibmaix07_Sras,
    CvInstanceName=Instance001'"
    db2 update db cfg for <new_db> using LOGARCHOPT1 "'CvSrcDbName=source_db,CvClientName=MP_DB2_ibmaix07_Sras,
    CvInstanceName=Instance001'"
    db2 restore db source_db load <Destination software install path>/Base/libDb2Sbt.so taken at 20080627113831 into new_db

Specifying the Media Parameters File

You can use a file to specify backup and restore job media parameters.

Note: In a multi-instance and multi-database configuration, you can configure multiple files by configuring this additional setting for each instance and database.

  1. From the CommCell Browser, right-click the client, and then click Properties:
  2. In the Client Properties dialog box, click the Additional Settings tab and then click Add.
  3. In the Add Additional Settings dialog box, enter the details for the additional setting:
    1. In the Name box, type sDB2MEDIAPARAMS_<instanacename>_<DATABASENAME>.

      Note: The database name must be in upper case.

    2. In Category box, select Db2Agent.
    3. In the Type box, select String.
    4. In Value box, type the full path to the parameter file.
    5. Click OK to close the Add Additional Settings dialog box.
  4. Click OK to close the Client Properties dialog box.

Performance Tuning

Several options are available for enhancing backup performance and reduce the network bandwidth used for performing backups. These options include:

  • Specifying the number of buffers for the backups. When you are backing up the database to multiple locations, you can specify a sufficient buffer value to improve performance.

  • Specifying the size of the buffer

  • Setting the parallelism.

DB2 iDataAgent perform backups using a system-generated script that is run behind the scenes from a command line. The CommCell Console serves as a front-end user interface for specifying various arguments and parameters that are passed to the backup script that is run.

  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 Advanced Options tab of the Subclient Properties dialog box:
    • In the Number of Buffers box, type or select the number of buffers.

      The default value is 2. However, if you are backing up to multiple locations, use a sufficient number of buffers to improve performance, and to avoid potential backup failure.

    • In the Buffer Size box, type or select the buffer Size.

      The minimum value is 8, and the default value is 1024.

    • In the Parallelism box, type or select the number of Parallelism queries you want to set for your backup operation.

      If the number is not set, the optimal value will be chosen automatically.

  4. Click OK.

Enabling DB2 Compression

You can use DB2 compression method to compress backup data. Use the following steps to enable DB2 compression method on the backup data:

  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 Advanced Options tab, select the Use Db2 Compression check box.
  4. Click OK.

Configuring Streams for Backups

You can specify the number of streams that can be used for backup operations. By default, backup data is sent to media in one stream. You can set it to 2 so a database is sent to media during a backup in two parallel waves. This results in backup taking about half the time to complete.

You can increase the number of streams used for backups for a particular subclient provided the number of streams does not exceed the maximum number configured in the subclient's storage policy. Increasing the number of streams for a subclient further reduces the amount of time a backup takes to complete. For example, increasing the number of streams from 2 to 3 enhances backup time from one-half that of a single stream to one-third. Keep in mind that the same number of streams used for performing a backup will be needed to restore the data Use the following steps to configure streams for backups:

Use the following steps to configure streams for backups:

  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:
    • In the Number of Data Backup Streams box, type or select the number of backup streams.
  4. Click OK.

Configuring the Number of Days to Hold Media Log Offset Files

By default, media log offset files older than 4 days are removed from the AUDIT_ERROR_PATH directory.  This can be configured to a different number.

  1. From the CommCell Browser, navigate to Client Computers.
  2. Right-click <Client>, and then click Properties.
  3. On the Client Properties dialog box, click Advanced.
  4.  On the Advanced Client Properties dialog box, navigate to the Additional Settings tab.
    1. Click Add.
    2. In the Name box, type nDB2PruneMediaOffsetFileAfterDays. The Category and Type details will be automatically displayed.
    3. In the Value box, enter the number of days to hold the media log offset files.
    4. Click OK.
  5. Click OK.

Enabling Offline Backups of Standby Databases

If you created a standby database by using the DB2 db2inidb command and the database is in a rollforward pending state and you have not applied logs, you must set the sSTANDBYBKUP additional setting to Y so that you can take an offline backup of the standby database.

  1. From the CommCell Browser, right-click the client, and then click Properties:
  2. In the Client Properties dialog box, click the Additional Settings tab and then click Add.
  3. In the Add Additional Settings dialog box, enter the details for the additional setting:
    1. In the Name box, type sSTANDBYBKUP.
    2. In the Category box, select Db2Agent.
    3. In the Type box, select String.
    4. In the Value box, type Y.
    5. Click OK to close the Add Additional Settings dialog box.
  4. Click OK to close the Client Properties dialog box.

Modifying an Agent, Instance, Backup Set or Subclient

There are several configurable properties available for your agent that can be modified from the agent, instance, or subclient level as needed.

The following table describes the properties that can configured from the agent, instance, and subclient levels.

Option Description Related Topics
Change Storage Policies You can modify the storage policies in any of the following situations:
  • To include a different media for the backup operation.
  • To use a storage policy with a different retention criteria.

You can change the storage policies from the subclient level.

  1. From the CommCell Browser, right-click the subclient.
  2. Click Properties.
  3. Click Storage Device.
  4. Select the Storage policy from the drop-down menu.
  5. Click OK.
Refer to Storage Policies.
Rename a Subclient

You can rename a subclient:

  1. From the CommCell Browser, right-click the subclient.
  2. Click Properties.
  3. Type the new name in the  Subclient name field.
  4. Click OK.
 
Rename an Instance You can rename a instance.
  1. From the CommCell Browser, navigate to Client Computers | <Client>| DB2.
  2. Right-click the <Instance>, and then click Properties
  3. In the Instance box, type the instance name.
  4. Click OK.
 
Data Transfer Options You can configure the available resources for transferring data secured by data protection operations from the subclient level. This includes the following:
  • Enable or disable Data Compression either on the client or on the MediaAgent.
  • Configure the transfer of data in the network using the options for Network Bandwidth Throttling and Network Agents.

You can configure the data transfer options.

  1. From the CommCell Browser, right-click the subclient.
  2. Click Properties.
  3. Click Storage Device.
  4. Click Data Transfer Option tab.
  5. Choose the appropriate software compression option for this subclient.
  6. Select Throttle Network Bandwidth and set the required bandwidth.
  7. Click OK.
Refer to Data Compression and Network Bandwidth Throttling.
View Data Paths You can view the data paths associated with the primary storage policy copy of the selected storage policy or incremental storage policy. You can also modify the data paths including their priority from the subclient level.
  1. From the CommCell browser, right-click the subclient.
  2. Click Properties.
  3. Click Storage Device.
  4. Select Storage Policy from the drop-down menu.
  5. Click Data Paths.
 
Configure a Subclient for Pre and Post Processing of Data Protection You can add, modify or view Pre/Post processes for the subclient. These are batch files or shell scripts that you can run before or after certain job phases.
  1. From the CommCell browser, right-click the subclient.
  2. Click Properties.
  3. Click Pre/Post Process.
  4. Click one of the following phases and type the full path of the process that you want to execute during that phase. Alternatively, click Browse to locate the process (applicable only for paths that do not contain any spaces.
    • PreBackup Process
    • PostBackup Process
    • PreSnap Process
    • PostSnap Process
  5. Click OK.
  6. Select Run Post Backup Process for all attempts to run a post backup process for all attempts.
  7. For subclients on Windows platforms, Run As displays Not Selected.

    If you want to change the account that has permission to run these commands, click Change.

    1. In the User Account dialog box, select Use Local System Account, or select Impersonate User and enter the user name and password. click OK.
    2. If you selected Local System Account, click OK to the message advising you that commands using this account have rights to access all data on the client computer.
Refer to Pre/Post Processes.
Configure Activity Control You can enable backup and restore operations from the agent and subclient level. However, you can enable restore operations only from the agent level.
  1. From the CommCell browser, right-click the subclient.
  2. Click Properties.
  3. Click Activity Control, select or clear option(s) as desired.
  4. Click OK.
Refer to Activity Control.
Configure User Security You can configure user security from the agent or subclient level. You can perform the following functions:
  • Identify the user groups and roles associated with the CommCell object.
  • Associate this object with a user group and role.
  • Disassociate this object from a user group and role.
  1. From the CommCell browser, right-click the subclient and then click Properties.

    The Subclient Properties dialog box appears.

  2. Click the Security tab and then click Add.

    The Add Users and Groups dialog box appears.

  3. In the Users and Groups section, select the user group to associate with the CommCell object, and then click Add.
  4. In the Role section, select the role to associate with the CommCell object.
  5. Click OK.

    For this subclient, the users in the user group are restricted by the permissions in the role.

Refer to User Administration and Security.
Enable and Disable Data Encryption When you configure encryption at the client level, it is configured automatically for all the subclients associated with all the agents installed on that client. If you want to disable or change the encryption at the subclient level, follow the steps given below:
  1. From the CommCell browser, right-click the subclient.
  2. Click Properties.
  3. Click Encryption.
  4. Select the desired encryption.
  5. Click OK.
Refer to Data Encryption.
View Software Version and Installed Updates At the client level, the Version tab of the Properties dialog box displays the software version of the component.
  1. From the CommCell Browser, expand Client Computers.
  2. Right-click the appropriate client, and then click Properties.
  3. Select the Version tab.
  4. Click OK.
 
CommCell Configuration Report The CommCell Configuration Report provides the properties of the CommServe, MediaAgents, clients, agents, subclients, and storage policies within the CommCell based on the selected filter criteria.
  1. From the CommCell browser, click Reports icon.
  2. Select CommCell Configuration.
  3. Click Run.
Refer to CommCell Configuration.

Deleting an Agent, Instance, Backup Set or Subclient

The following sections describe the steps involved in deleting an agent, instance, or subclient.

Refer to the troubleshooting article on Recovering Data Associated with Deleted Clients and Storage Policies for informataion about how to recover data if you accidentally delete an entity.

Deleting an Agent

You need to uninstall or DeConfigure the agent software from the client computer before deleting from CommCell Browser. After you delete the client software, you can either leave the corresponding data intact for appropriate action or you can remove the data immediately. If you choose to remove the data immediately, you must delete the agent from the CommCell Browser. If you delete the agent, all of the agent's data is irretrievably lost.

  • You cannot delete an agent while operations for that agent are running.
  1. From the CommCell Browser, navigate to Client Computers | <Client>.
  2. Right-click the <Agent>, and then click Delete.
  3. A confirmation message is displayed with the following message:

    This operation will permanently delete the data backed up from this level and it cannot be restored.

  4. Click OK to continue with the deletion operation or click No to abort the deletion.

Deleting an Instance

Consider the following before deleting an instance:

  • When you delete a specific instance all job schedules and job histories that pertain to any of the levels within the deleted instance are deleted.
  • You cannot delete an instance if it is being backed up. Attempts to delete an instance under such conditions cause the deletion to fail. If a backup is in progress, either wait for the backup to complete or kill the backup job using the Job Manager. Once the backup is no longer in progress, you can delete the instance level.
  • You cannot delete an instance if there is only one instance present for an agent. To delete the final instance, you must remove the agent software from the client computer.
  1. From the CommCell Browser, right-click the instance that you want to delete, click All Tasks and then click Delete.
  2. click Yes to confirm the deletion. (clicking No cancels the deletion and retains the node.)
  3. Type the requested phrase in the Enter Confirmation Text dialog box and click OK. This should delete the instance.

Deleting a Backup Set

Consider the following before deleting a subclient:

  • Schedules associated with the subclient are also automatically deleted.
  1. From the CommCell Browser, navigate to Client Computers | <Client> | <Agent> | <Instance>.
  2. Right-click the <Backupset > that you want to delete, and then click Delete.
  3. A confirmation message is displayed, asking if you want to delete the subclient.

    Click No to cancel the deletion and retain the subclient, or click Yes to continue the deletion.

Deleting a Subclient

In cases where a new subclient is created with the same name as a deleted subclient, the system will append a Unix time stamp to the deleted subclient's name in data protection job history reports and views to distinguish the two subclients. For example, subclientname_1104257351.

Consider the following before deleting a subclient:

  • You cannot delete a default subclient.
  • Schedules associated with the subclient are also automatically deleted.
  1. From the CommCell Browser, navigate to Client Computers | <Client> | <Agent> | <Instance> | < Backupset >.
  2. Right-click the <Subclient> that you want to delete, and then click Delete.
  3. A confirmation message is displayed, asking if you want to delete the subclient.

    Click No to cancel the deletion and retain the subclient, or click Yes to continue the deletion.