DB2 High Availability Disaster Recovery (HADR)

In a High Availability Disaster Recovery (HADR) environment, the data is continually replicated from the source (primary) database to the target (standby) database by using the DB2 transaction logs. If something happens to the primary database, then the standby database is immediately ready to take over for the primary database.

Perform the following configuration procedure, backup procedure, and restore procedure to use DB2 HADR with the Commvault software.

DB2 High Availability Disaster - DB2 Automated Failover Using the IBM Tivoli System Automation (TSA) with a Virtual IP Address

Before You Begin

Make sure that you have configured all databases according to the IBM HADR specifications.

Procedure

  1. Install the DB2 Agent on the primary database server and standby database server. For information on the installation, see Getting Started with the DB2 Agent.

    Note

    you must use the same Commvault installation path on the primary database server and the standby database server.

  2. Configure the cluster server on the CommServe and add the primary database server and standby database server. For information on the cluster configuration, see Cluster Configuration - Overview.

    Use the following values when you configure the cluster.

  3. Option

    Value

    New Unix Cluster Client dialog box, Client Name box

    The name of the virtual client.

    New Unix Cluster Client dialog box, Host Name box

    The full name of the virtual client.

    Advanced Client Properties dialog box, Cluster Configuration tab, Nodes tab, Available box

    The DB2 HADR clients.

    Advanced Client Properties dialog box, Cluster Configuration tab, Agents tab, Available box

    DB2 Agent

    Advanced Client Properties dialog box, Job Configuration tab, Job Results Directory box

    The full path to job results directory.

    Note

    The directory must exist on all DB2 nodes and Commvault must own the directory.

  4. On the cluster server client, add the following for the primary database:

    1. Add an instance.

    2. Add a backup set.

  5. On the standby database server client, add an instance.

  6. Configure DB2 Servers for DB2 HADR Using IBM Tivoli System Automation (TSA) with a Virtual IP Address.

  7. Optimize the MediaAgents that are associated with the storage policy for concurrent LAN backups. For more information, see Configuration - Optimize a MediaAgent for Concurrent LAN Backups. If you cannot enable the MediaAgents, then configure a persistent pipeline for DB2 HADR operations.For more information, see Configuring a Persistent Pipeline for DB2 HADR Operations.

  8. If you have a CommServe firewall, then run the SetClientProp.sql qScript on the CommServe computer command line from the software_installation_path\Base folder:

    qoperation execscript -sn SetClientProp.sql -si c=virtualClientName  -si UsePhysicalnode=y

    Example

    C:\Program Files\CommVault\Simpana\Base>qoperation execscript -sn SetCLientProp.sql -si c=db2hadrVirtualClient -si UsePhysicalNode=Y
  9. Perform an online backup.

  10. Perform a DB2 HADR restore.

  11. Go to the IBM DB2 help website and follow the instructions to configure HADR on both the primary and standby databases.

    For information on how to configure the primary server, go to the IBM DB2 help website, Configuring the HADR primary server.

    For information on how to configure the standby server, go to the IBM DB2 help website, Configuring the HADR standby server.

    You must configure the following database parameters:

    • Local IP Address (HADR_LOCAL_HOST)

    • Local Service Name/Port (HADR_LOCAL_SVC)

    • Remote IP Address (HADR_REMOTE_HOST)

    • Remote Service Name/Port (HADR_REMOTE_SVC)

    • Remote DB2 Instance Name (HADR_REMOTE_INST)

    • Synchronization Mode (HADR_SYNCMODE)

  12. Use the DB2 command line interface to start HADR on the standby database.

    Substitute the standby_database_name parameter with the name of your standby database.

    db2 start HADR ON DB <standby_database_name> as standby

  13. Use the DB2 command line interface to start HADR on the primary database.

    Substitute the primary_database_name parameter with the name of your standby database.

    db2 start HADR ON DB <primary_database_name> as primary

Loading...