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: Is Database Up?

Re: Is Database Up?

From: <amerar_at_iwc.net>
Date: 28 Aug 2006 09:19:09 -0700
Message-ID: <1156781949.099155.278600@b28g2000cwb.googlegroups.com>

jbmo..._at_gmail.com wrote:
> amerar_at_iwc.net wrote:
> > Hi All,
> >
> > I want to write a Unix shell script that will check to see if a
> > database, on a remote machine, is up. Is this possible without writing
> > some long telnet routine or something?
> >
> > I was hoping for some simple command that I can grep for some string to
> > tell me the status of the remote database........
> >
> > Thanks!!!
>
> Hi,
>
> a few years back there was a file created only when the instance was
> up. I think it's gone. Maybe you could write a pl.sql script using the
> utl file package that creates a file at startup of the instance. Now I
> don't know if i's possible to delete the file at shutdown.
> grep for the oracle processes is not reliable because one might be down
> according to Murphy's law.

Thanks for the tip, but I was hoping for some simple command in Unix that I can run and pipe the results or status code into a variable.........something similar to:

row_count=`ps -ef | grep ora_smon_$ORACLE_SID | fgrep -v 'grep' | wc -l`

But, it would have to be for a remote database........... Received on Mon Aug 28 2006 - 11:19:09 CDT

Original text of this message

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