Enabling HADR Automatic Client Reroute

You can enable the Db2® HADR Automatic Client Reroute (ACR) feature by running the manage_hadr command with the -enable_acr option.

You must run this command on both the primary and standby deployments, using the service and NodePort of the other deployment. For example:

oc exec -it primary-db2wh-svc-id-db2u-0 -- manage_hadr -enable_acr standby-db2wh-svc-id-db2u-engn-svc:NodePort
oc exec -it standby-db2wh-svc-id-db2u-0 -- manage_hadr -enable_acr primary-db2wh-svc-id-db2u-engn-svc:NodePort

Where db2wh-svc-id is the Db2 Warehouse service identifier on Red Hat® OpenShift® that is associated with the primary and standby deployments (for example, c-db2wh-1616468282925295). Use the oc get service command to find the exact values, as well as the NodePort value.

For example, if your primary deployment is db2wh-1616468282925295 and your standby deployment is db2wh-1616469166354348, the commands would look like this:

oc exec -it c-db2wh-1616468282925295-db2u-0 -- manage_hadr -enable_acr c-db2wh-1616469166354348-db2u-engn-svc:31900
oc exec -it c-db2wh-1616469166354348-db2u-0 -- manage_hadr -enable_acr c-db2wh-1616468282925295-db2u-engn-svc:31806

When ACR is enabled, follow the instructions at Connecting clients to the HADR configuration.

For more information, see Db2 automatic client reroute with HADR.