Hi All
Thanks in advance
Can you guys please help me in providing an SQL script that display the
database names and its status in a db2 instance..
I need to write a java program that displays this details
Pl help me
Regards
Santhosh
Rhino - 16 May 2006 19:49 GMT
> Hi All
>
[quoted text clipped - 6 lines]
>
> Pl help me
Why write a script when the Control Center displays all of this for you
nicely in an attracive and highly functional GUI?? The GUI lets you see the
status and also do umpteen others things with your databases, tables,
procedures, etc.
--
Rhino
aj - 16 May 2006 20:34 GMT
You didn't mention OS or DB2 version (these always help). Are you sure
you're not more interested in instance status than database status?
You just want to know if DB2 is up and working, yes?
This kind of stuff is much easier in a scripting language rather than java.
In *nix, this (check_db2sysc.sh) will tell you if the instance is up:
if [ `ps aux | grep db2sysc | grep <INSTANCE> | grep -v grep | grep -v
check_db2sysc | wc -l` -eq 0 ]
then
echo "DB2:<INSTANCE> instance down" | /bin/mail page_whoever
fi
Stick 'er in a cron and away you go.
HTH
aj
> Hi All
>
[quoted text clipped - 9 lines]
> Regards
> Santhosh
Dave Hughes - 16 May 2006 20:46 GMT
> Hi All
>
[quoted text clipped - 9 lines]
> Regards
> Santhosh
Take a look at this earlier thread <http://tinyurl.com/zre56> in
particular the two articles Kums' post (the first reply) links to.
Might provide some useful commands and procedures that you could make
use of.
HTH,
Dave.