There are a number of methods you can use to monitor the status of your (high availability disaster recovery ) HADR databases.
db2pd -db dbname -hadr
This command collects status information and formats the output. The information returned represents a snapshot of the database manager operational status at the time the command was issued. HADR information appears in the output under the heading HADR status.
This API collects database manager monitor information and returns it to a user-allocated data buffer. The information returned represents a snapshot of the database manager operational status at the time the API was called.
You can access the information in any of these views or table functions using a SELECT statement.
The current role of a database is indicated by the database configuration parameter hadr_db_role. Valid values for this configuration parameter are PRIMARY, STANDBY, or STANDARD (the latter indicates the database is not an HADR database). To determine the role, you can use the GET DATABASE CONFIGURATION command or GET SNAPSHOT FOR DATABASE command (but only when the database is active).
db2 get snapshot for all on hadrdb | grep "Database status"
Database status = Active Standby
db2pd -db hadrdb
Database Partition 0 -- Database HADRDB -- Active Standby -- Up 0 days 01:24:01
SELECT SUBSTR(DB_NAME, 1, 20) AS DB_NAME, DB_STATUS FROM SYSIBMADM.SNAPDB
DB_NAME DB_STATUS
-------------------- ----------------
HADRDB ACTIVE_STANDBY
SELECT SUBSTR(DB_NAME, 1, 20) AS DB_NAME, DB_STATUS
FROM table(SNAP_GET_DB_V97('hadrdb', 0))
DB_NAME DB_STATUS
-------------------- ----------------
HADRDB ACTIVE_STANDBY