By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,590 Members | 2,191 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,590 IT Pros & Developers. It's quick & easy.

Trying to create a heartbeat for db2

P: n/a
I am new to db2 and I am trying to create a script to see if
db2 is alive and functioning.

What I am looking for is a call or function that is equivalent
to Oracle's tnsping that I can call to see if db2 is alive.

Is there such a thing?

Thanks for your help.

-arthur
Nov 12 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
which db2 version do you have?

check instance, you can use "db2gcf", see to "command reference";

more, if you want to test a database state, just connect to it and
check the return code. also, db2 has a "ping" command which tells you
the time db2 serve you.

Nov 12 '05 #2

P: n/a
On Tue, 11 Oct 2005
20:02:49 -0700, Hardy wrote:
which db2 version do you have?

check instance, you can use "db2gcf", see to "command reference";

more, if you want to test a database state, just connect to it and
check the return code. also, db2 has a "ping" command which tells you
the time db2 serve you.


Thanks, this seems to be what I was looking for.

-arthur

Nov 12 '05 #3

P: n/a
aj
# The purpose of this script is to check if the db2sysc instance master
daemon
# for the oltp instance is up and functioning. If not, call for help..

if [ `ps aux | grep db2sysc | grep oltp | grep -v grep | grep -v
check_db2sysc_oltp | wc -l` -eq 0 ]
then
echo "DB2:oltp instance db2sysc not found" | /bin/mail page_allen
fi

HTH
aj

Arthur Salazar wrote:
I am new to db2 and I am trying to create a script to see if
db2 is alive and functioning.

What I am looking for is a call or function that is equivalent
to Oracle's tnsping that I can call to see if db2 is alive.

Is there such a thing?

Thanks for your help.

-arthur

Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.