469,270 Members | 1,078 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,270 developers. It's quick & easy.

Trying to create a heartbeat for db2

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
3 4501
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
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
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.

Similar topics

5 posts views Thread by Kenneth | last post: by
6 posts views Thread by Frank Wilson | last post: by
1 post views Thread by יוני גולדברג | last post: by
1 post views Thread by Rob R. Ainscough | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.