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 whether the Oracle database is up?

Re: How to check whether the Oracle database is up?

From: Billy Verreynne <vslabs_at_onwe.co.za>
Date: Fri, 30 Aug 2002 12:29:57 +0200
Message-ID: <aknhfm$2jk$1@ctb-nnrp2.saix.net>


Sri wrote:

> Using a script, I want to check whether my database instance has been
> started and mounted or not.
> What is the best way to do this?

Platform?

On Unix, you can do a ps and grep for all processes for the Oracle user and all processes for the applicable SID.

Or you can try a SQL*Plus connection and check STDERR/STDOUT to see if the connection fails, something like:
# sqlplus xxx/xxx < /dev/null | grep ORA

If the result is not a ORA-01017 (invalid username/password) then the database is likely down, in restricted mode, hanging because archive logs are full, busy with a shutdown, or whatever. Whatever it is, it is definately not publicly available for client connections.

Or you can pipe the output of (ex-)server manager to log when the db start is done and then inspech the log with a few well places awk's and grep's.

--
Billy
Received on Fri Aug 30 2002 - 05:29:57 CDT

Original text of this message

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