Lssam shows "unknown" status for HADR database. The database is connectable and does not seem to be affected. The "unknown" status may result in failure for automatic takeover.
Lssam shows "unknown" status for HADR database. Problem persist after removing and adding the database back again via db2haicu. Example of a database SAMPLE on instance ha :
Online IBM.ResourceGroup:db2_ha_ha_SAMPLE-rg Nominal=Online
'- Unknown IBM.Application:db2_ha_ha_SAMPLE-rs
|- Unknown IBM.Application:db2_ha_ha_SAMPLE-rs:db2tsa1
'- Unknown IBM.Application:db2_ha_ha_SAMPLE-rs:db2tsa2
The monitoring script runs as root and rely on the command "su - X -c 'db2pd -db <dbname> -hadr" to get the status of the HADR database. DB2 will not be able to know the status if the command 'su - X -c <cmd>' does not work properly due to some entries in $HOME/profile of the instance owner X.
All flavours of Unix / Linux, and environments running TSA/HADR.
Diagnosing The Problem
As root, run a simple command like "su - X -c id". It should show the id information of user X and return to the root prompt. If it works, proceed to run "su - X -c db2pd -db <dbname> -hadr" , where X is the instance owner. You should see the status of the HADR database.
Resolving The Problem
Isolate and comment out the portion of commands in $HOME/profile that is causing the "su - X -c id" to fail.
Was this topic helpful?
16 June 2018