Configuration - DB2 Database Administrator
Configuring the DB2 Database Parameters
Vendor Parameters
Use the following Vendor parameters to configure and protect the DB2 databases with SnapProtect:
Parameter | Description | Example |
---|---|---|
CvInstanceName | Name of the installed SnapProtect instance. This parameter is required only when multiple instances of SnapProtect are installed. |
Instance001 |
CvClientName | Name of the client defined in the CommCell Console. This parameter is required only when multiple instances of SnapProtect are installed. |
dbserve1 |
CvSrcDbName | Name of the source database name. This parameter is required to perform cross database, cross instance, or cross machine restores. |
source_db |
CvSrcDB2InstanceName | Name of the Source DB2 instance name. This parameter is required to perform cross database, cross instance, or cross machine restores. |
db2inst1 |
CvSrcClientName | Name of the Source Client name. This parameter is required to perform cross database, cross instance, or cross machine restores. |
dbserver1 |
CvDb2RestoreCopyPrec | The Copy precedence number as displayed in the storage policy properties. This parameter is required to restore from a secondary copy. |
2 |
DB2 Parameters
Use the following DB2 parameters to configure and protect the DB2 databases:
Parameter | Description | Example |
---|---|---|
LOGARCHMETH1 | The SnapProtect library that archives and manages the DB2 database log files. | UNIX:
db2 update db cfg for <database name> using LOGARCHMETH1 “'VENDOR:/opt/SnapProtect/Base/libDb2Sbt.so'” Windows: db2 update db cfg for <database name> using LOGARCHMETH1 |
LOGARCHOPT1 | Enable the DB2 database to communicate with the SnapProtect storage system in the log archive and retrieve operations. |
db2 update db cfg for <database name> using LOGARCHOPT1 "'CvClientName=<ClientName>,CvInstanceName=<SnapProtectInstanceName>'" |
VENDOROPT | Enable the DB2 database to communicate with the SnapProtect storage system in the backup, restore, or load copy operations. |
db2 update db cfg for <database name> using VENDOROPT |
TRACKMOD | Allow incremental or delta backups. This is required when you perform incremental or delta backups and restores. If this is not set, you can only perform default of full backups. |
db2 update db cfg for <database name> using TRACKMOD on |
For more information, see Setting the Database Configuration Parameters.
Vendor Library
The following are the default paths of vendor library for various platforms:
Operating System | Vendor Library path |
---|---|
AIX | <SnapProtect install path>/Base64/libDb2Sbt.so’ |
Solaris | <SnapProtect install path>/Base64/libDb2Sbt.so’ |
zLinux | <SnapProtect install path>/Base64/libDb2Sbt.so’ |
Linux | <SnapProtect install path>/Base/libDb2Sbt.so’ |
HP Itanium | <SnapProtect install path>/Base/libDb2Sbt.so’ |
Windows | <SnapProtect install path>\Base\DB2Sbt.dll’” |
Use the following SnapProtect utilities to configure the DB2 Parameters.
- Db2_config.sh for Unix
- Db2_config.ps1 for Windows
Note: In a clustered environment, the Db2_config.sh script on Unix and Db2_config.ps1 script on windows will update the DB2 database configuration parameters on the physical node only.
UNIX
The Db2_config.sh is available in SnapProtect_path/iDataAgent on the UNIX client. Use this utility to set the database configurations using SnapProtect DB2 on UNIX iDataAgent. Use this to perform data and log backups on a DB2 Instance. This utility also verifies if the instance user has read/write permissions on the Archive/Retrieve/Audit error directories. You must be a DB2 instance user and need to be added to the UNIX group of SnapProtect to run this utility.
- From the DB2 command prompt, navigate to <SnapProtect install path>/iDataAgent to locate the db2_config.sh utility.
- Use the db2_config.sh utility to configure the DB2 database configuration parameters.
Usage
Db2_config.sh -d <dbname> [-i <SnapProtect_instance>]
The Db2_config.sh utility will perform the following:
- Updates the configuration settings for <dbname> database
- Verifies whether the currently logged in db2 instance owner has read/write permissions to the Archive/Retrieve directories.
WINDOWS
The script Db2_config.ps1 is located under SnapProtect\iDataAgent location.
The Windows powershell needs to run it from SnapProtect_installation\iDataAgent\Db2_config.ps1.
Use the following steps to run this script from the DB2 command line prompt:
- Enable the powerShell script execution on the system:
powershell Set-ExecutionPolicy Unrestricted
- Execute the script:
powershell.\SnapProtect_installation\iDataAgent\Db2_config.ps1
Db2_config.ps1 -d <dbname> [-i <SnapProtect_instance>] - Disable the powerShell script execution on the system:
powershell Set-ExecutionPolicy Restricted
When you modify the LOGARCHMETH1 parameter, you must perform an offline full backup so that DB2 moves the database out of the BACKUP_PENDING state.
Configuring an Instance Using XML
To add an instance, see Adding DB2 Instances Using the SnapProtect Command Line Interface.
To modify an instance, see Modifying DB2 Instances Using the SnapProtect Command Line Interface.
To get the instance properties, see Viewing DB2 Database Instance Properties Using the SnapProtect Command Line Interface.
To delete an instance, see Deleting DB2 Instances Using the SnapProtect Command Line Interface.
Configuring a Backup Set Using XML
To add a backup set, see Adding DB2 Backup Sets Using the SnapProtect Command Line Interface.
Configuring a Subclient Using XML
To add a subclient, see Adding DB2 Subclients Using the SnapProtect Command Line Interface.
To modify a subclient, see Modifying DB2 Subclients Using the SnapProtect Command Line Interface.
To get the a subclient properties, see Viewing DB2 Database Subclient Properties Using the SnapProtect Command Line Interface.
To delete a subclient, see Deleting DB2 Subclients Using the SnapProtect Command Line Interface.