Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: How to check the database is available

Re: How to check the database is available

From: <volleyball_at_ntr.net>
Date: Sun, 15 Aug 1999 16:45:58 GMT
Message-ID: <37b6ebfb.807006@news.ntr.net>

We have many oracle, sybase and DB2 databases that we want to monitor on NT, unix and the Mainframe. We wrote a poor man's monitoring tool that runs on an NT workstation. We just issue a plus80 uid/pwd_at_service and check the errorloevel return code in NT. This kicks off about every five minutes and checks some 40-60 dbs. If there is an error connecting, we page the troops. We have it scheduled to check more often during work hours, not check during maintenance windows, etc.... NT KRON works well for this.

I assume there is an equivilant to error level in Unix? If not you could do sometiming like this: (i'll psedo code - I just getting back into UNIX.)

MAINLINE program
Call AFILE with uid pwd and service name1 Call AFILE with uid pwd and service name2 etc...

AFILE
Delete out.out
plus80 uid/pwd_at_service @check.sql pipe the output to out.out grep out.out for 'ALIVE'
if ONLINE not found in out.out page the troops

CHECK.SQL
spool out.out
Select 'ALIVE' from dual;
spool off
exit;

Doug Coan
Senior Client Server Systems Integrator DCoan_at_aegonusa.com
"Live to Learn and Learn to Live"

On Sun, 15 Aug 1999 07:59:00 GMT, kinwho_at_my-deja.com wrote:

>Hi,
>
>I need to write an UNIX script to detect whether the instance is up and
>the databse is online. The script is run on the same machine of the
>instance, but my database user login does not have sa role. I could
>grep on the Oracle process to detect the instance is up. But, I don't
>know how to detect the database is online. Any suggestion or idea?
>
>Thanks,
>Kin Ho
>
>
>Sent via Deja.com http://www.deja.com/
>Share what you know. Learn what you don't.

Doug Coan
Senior Client Server Systems Integrator DCoan_at_aegonusa.com
"Live to Learn and Learn to Live" Received on Sun Aug 15 1999 - 11:45:58 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US