Check DB2 HADR Status: Quick Guide
To check the HADR (High Availability and Disaster Recovery) status of DB2, you can use the following command:
- Open the command line interface.
- Run the following command to connect to the DB2 database instance:
db2 connect to <database_name>
Replace
- 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.