Modifying HADR configuration parameters

The setup_config_hadr script that is used when setting up an HADR configuration sets the 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 should not be modified after the script is run. Other parameters are set with default values but can be adjusted by using the steps below.

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

For more information, see HADR configuration parameters .

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

Procedure

  1. Exec into the Db2® pod and switch to the database instance owner:
    oc exec -it c-db2udeployment-primary-db2u-0 -- bash
    su - db2inst1
    
  2. Update the desired 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