Check DB2 HADR Status: Quick Guide

To check the HADR (High Availability and Disaster Recovery) status of DB2, you can use the following command:

  1. Open the command line interface.
  2. Run the following command to connect to the DB2 database instance:
db2 connect to <database_name>

Replace with the name of the database you want to connect to.

  1. Run the following command to view the HADR status:
db2 get hadr state

This command will display the current status of HADR, including the role (Primary or Standby), sync mode (sync or async), and connection status.

Note: Sufficient permissions are required to execute the above command.

bannerAds