Debugging the DB2DB_HADR application
The following debugs are available in HADR monitoring:
- Database collector debug - COLLECTORS > KM Commands > Debug Switches > CollDatabase > ON/OFF
- Database discovery debug -DB2_SETUP > KM Commands > Debug Switches > DB2_DB Discovery > ON/OFF
The debugs provide the information about the following:
- hadr_role
- ConnectionStatus
- HeartBeatsMissed
- LogGapRunningAvg
The debug shows one of the following values for hadr_role:
- Not collected: indicates that the database is not a HADR database
- 1: indicates that the database is a primary HADR database
- 0: indicates that the database is a secondary HADR database
For the DB2DB_HADR parameters, the values collected from database snapshot are displayed if the HADR database is primary. Otherwise, debug shows a value Not Collected.
You can verify HADR related information using the DB2 UDB instance user credentials and by executing the following command:
db2 get snapshot for db on databaseName
The following is a sample database snapshot for a primary HADR database:
{{HADR Status}} {{Role = Primary}} {{State = Peer}} {{Synchronization mode = Nearsync}} {{Connection status = Connected, 09/03/2009 16:02:49.490051}} {{Heartbeats missed = 0}} {{Local host = sina}} {{Local service = 18825}} {{Remote host = pat-dbkm-aix02}} {{Remote service = 18826}} {{Remote instance = hadr8s}} {{timeout(seconds) = 600}} {{Primary log position(file, page, LSN)= S0000020.LOG, 322, 000000000573272C}} {{Standby log position(file, page, LSN)= S0000020.LOG, 322, 000000000573272C}} {{Log gap running average(bytes) = 0}}
The following is a sample snapshot for a standby HADR database:
{{HADR Status}} {{Role = Standby}} {{State = Peer}} {{Synchronization mode = Nearsync}} {{Connection status = Connected, 09/03/2009 16:13:13.405352}} {{Heartbeats missed = 0}} {{Local host = pat-dbkm-aix02}} {{Local service = 18826}} {{Remote host = sina}} {{Remote service = 18825}} {{Remote instance = hadr8p}} {{timeout(seconds) = 600}} {{Primary log position(file, page, LSN)= S0000020.LOG, 322, 000000000573272C}} {{Standby log position(file, page, LSN)= S0000020.LOG, 322, 000000000573272C}} {{Log gap running average(bytes) = 0}}
Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*