Thursday, June 14, 2012

Identifying Primary/Standby db's.

Is there a way to tell if the database is a HADR Primary or Standby database when the database and instances are down. 
             Sure. Search (grep) for "HADR state" in the db2diag.log file (This file is present in the db2dump directory).  The last state in the search results will indicate what state the database was in before the database was shutdown. If the state is something that starts with 'S' (like S-Peer) then the database was a standby database and was in Peer state. If the state is something that starts with 'P' (like P-Peer) then the database was a primary database and was in Peer state.

1 comment:

Anonymous said...

I just like the helpful info you provide on your articles.
I'll bookmark your blog and test again right here regularly.

I am somewhat certain I'll be informed lots of new stuff proper here!
Best of luck for the next!

Here is my weblog: lifestyle liberation blueprint