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: Florin David <florind_at_earthlink.net>
Date: Sun, 15 Aug 1999 23:24:32 -0600
Message-ID: <37B7A090.3FE60C16@earthlink.net>


Two caveats:
The databse could have crushed and the shared memory segment not released and the sga_.def file is still there.
Oracle plans to make that file obsolete. I would simply try to connect to SQLPLUS and exit and grep the resulting message for "Oracle not available" or something similar. Florin

Sybrand Bakker wrote:

> You should test on the existence of the file
> $ORACLE_HOME/dbs/sgadef<sid>.dbf.
> This is the method the dbstart program uses.
> Which instances there are is maintained in /etc/oratab,
> /var/opt/oracle/oratab on Solaris.
>
> Hth,
>
> Sybrand Bakker, Oracle DBA
>
> <kinwho_at_my-deja.com> wrote in message news:7p5s01$v57$1_at_nnrp1.deja.com...
> > 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.
Received on Mon Aug 16 1999 - 00:24:32 CDT

Original text of this message

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