Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / DB2 Topics / May 2006

Tip: Looking for answers? Try searching our database.

Database Status Script

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Santhosh - 16 May 2006 10:44 GMT
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.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.