IBM Support

Lssam shows 'unknown' status for HADR database

Troubleshooting


Problem

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.

Symptom

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

Cause

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.

Environment

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.

[{"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"High Availability - Cluster Management","Platform":[{"code":"PF016","label":"Linux"}],"Version":"9.8;9.7;10.1;10.5","Edition":"Advanced Enterprise Server;Advanced Workgroup Server;Enterprise Server","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
16 June 2018

UID

swg21961711