Modifying Db2 HADR configuration parameters

The setup_config_hadr script that is used to set Db2 HADR configuration parameters.

About this task

Some of the parameters are static, such as hadr_local_host, hadr_remote_host, and hadr_target_list. These parameters must not be modified after the script is run. Other parameters are set with default values but can be adjusted by using the following steps.

The HADR configuration parameters that can be modified are:

hadr_syncmode
  • Default for primary and principal standby database: NEARSYNC
  • Default for auxiliary standby databases: ASYNC
hadr_timeout
  • Default: 120 seconds
hadr_peer_window
  • Default: 120 seconds

See the Db2 HADR configuration parameter documentation for more information.

Note: You can change HADR configuration parameters only before Starting an HADR configuration for Db2, or when HADR is stopped.

Procedure

  1. Exec into the Db2 pod and switch to the database instance owner:
    oc exec -it c-db2oltp-primary-db2u-0 -- bash
    su - db2inst1
    
  2. Update the database configuration parameter by using the db2 update command.

    The structure of the command is:

    db2 update db cfg for dbname using param value

    For example:

    db2 update db cfg for BLUDB using HADR_TIMEOUT 180