Database status

sureshp

Member
Hi,

Is there anyway to find whether a database is up or down.

i want to prepare a list of DBs which are running.
 

manish.s

New Member
I think you can use the below command.
$DLC/bin/proutil mfgtrain -C busy
this will gv the status of db

or else.. .lk file can also be used to see db is start or shut.

Hope this may help.
 

Casper

ProgressTalk.com Moderator
Staff member
To be more specific: -C busy returns, depending on the status, different exit codes:
0 database is not in use
6 database is in use
64 database is starting up

Casper.
 

taqvia

Member
write a small snippet as below:

proutil <database> -C holder >/dev/null 2>&1;RETURN_CODE=$?

case "$RETURN_CODE" in
'16')print "In Multi-User" ;;
'14') print "In Single-User - \c" ;;
'0') print "Database Closed - \c" ;;
*) print "Bad Database - \c" ;;
esac


Arshad
 
  • Like
Reactions: jms

jozef

New Member
I hope you don't mind me resurrecting this thread but I would like to ask a question relating to it.

In the organisation where I work, we have mutiple db's run on multiple servers, using Progress 9.1D (upgrading soon to 10.2B). Each server is administered by a local IT person, who has root access. Unfortunately, this is not open for debate :-(

Occasionally, while they're trying to do something they kill off a process which stuffs up the db server. When users try to logon, they get the "
Error 1384 ( The database is being shutdown )" message.


When I run a proutil -C busy or -C holder, I get "** The database XXX is in use in multi-user mode. (276)". We run these commands periodically to make sure the db's are ok. Is there a command I can run that will return me the error 1384 error? We don't want to run pro or mpro to test as one or another of the db's may be down for other work.


Thanks
 

RealHeavyDude

Well-Known Member
Do I understand this correct - you want to know when a shutdown of the database is happening?

AFAIK, the proutil -C busy will always return the 276 message until the database is down. Therefore if a shutdown is initiated you won't catch it with this method.


To me this sounds more like the need to proactively manage the databases. If that's the case then you have several options beginning with
  • The poor-man's solution: Your best resource is the database logfile. This implies that you parse the database logfile periodically for certain events and act on them,
and ending with
  • OpenEdge Management (formerly know as Fathom) which is able to proactively manage the databases.
Which option you chose is depending on what you want to achieve and how much effort vs. money you can afford.


Best regards, RealHeavyDude.
 
Top