Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to check the database is available
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 Sun Aug 15 1999 - 05:54:05 CDT
![]() |
![]() |