Setting up the HADR configuration for Db2
Important: IBM Cloud Pak for Data
Version 4.7 will reach end of support (EOS) on 31 July, 2025. For more information, see the Discontinuance of service announcement for IBM Cloud Pak for Data Version 4.X.
Upgrade to IBM Software Hub Version 5.1 before IBM Cloud Pak for Data Version 4.7 reaches end of support. For more information, see Upgrading IBM Software Hub in the IBM Software Hub Version 5.1 documentation.
After you configure the service endpoints, you can quickly set up the high availability disaster recovery (HADR) configuration by running a script that performs the setup steps.
Before you begin
- Determine the HADR ports corresponding to each database.
- In a topology with a single OpenShift®
cluster, the ports for each database are:
- Primary: 60006
- Standby: 60007
- Aux1: 60008
- Aux2: 60009
- In a multiple cluster topology, use Determining the Db2 NodePorts for a multiple cluster configuration.
- In a topology with a single OpenShift®
cluster, the ports for each database are:
- If databases are in different OpenShift projects on the same cluster, also determine the IP addresses for each HADR service.
- Ensure you have the etcd endpoint (IP address/hostname and port) available for HADR setup. Use
the same etcd endpoint when configuring on all deployments. See Setting up an etcd store for HADR in
Db2.
For a development-only environment with all databases on a single OpenShift cluster, you can use the built-in etcd store of the primary database.
About this task
The script:
- Generates and sets the Db2 HADR database configuration parameters
- On the primary database, generates an offline backup of the database and the encryption keystore.
- On the standby databases, restores the offline backup image and encryption keystore that were copied from the primary database.
For full command syntax and parameter descriptions, see setup_config_hadr script for Db2.
To set up HADR, follow these steps: