Monitoring AI/Replication

Posted by James Palmer on 28-Apr-2014 04:37

I seem to be monopolising this forum at the moment! Sorry! 

We have a couple of batch scripts that run on a regular basis to monitor the AI status and the Replication status. It's a load of Perl scripts that send emails if any anomalies are found. The problem is, if one of the databases is not running then we don't necessarily get any emails about failure. I'd like to tweak the scripts to check if the databases are running before doing any monitoring, and alert people if the databases are down. Alternatively it might be easier just to have a separate script that checks for the dbs running. Either way, I was wondering what the "best" method is for deciding if a database is running. 

All Replies

Posted by Paul Koufalis on 28-Apr-2014 09:21

proutil DB -C holder and check the return code.  Details in the DB Admin Guide and Reference, but IIRC 0 means DB down, 14 means single-user and 16 means multi-user.

Posted by James Palmer on 28-Apr-2014 09:23

Thanks Paul :)

This thread is closed