Enabling reads on standby for Db2

You can enable the reads on standby feature on your HADR standby Db2 database by using the DB2_HADR_ROS registry variable.

About this task

For full documentation, see Enabling reads on standby.

Important:
  • The reads on standby feature should be enabled prior to starting HADR.
  • You cannot use automatic client reroute (ACR) if you enable reads on standby.

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. Use the db2set command to enable reads on standby:
    db2set DB2_HADR_ROS=ON
  3. Restart the Db2 database.
    db2stop
    ipclean -a
    db2start