Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Is database up
That works if you're on the same machine. I need to find out if a DB is up
on a remote box and remote commands such as rsh are not available.
Thanks for the reply
--
Jim Gregory
Principal Consultant for Keane, Inc.
Currently assigned to NCR
"Opinions are my own and do not reflect
those of Keane or my clients"
James Hanway <hanwayj_at_dfo-mpo.gc.ca> wrote in message
news:380F4FD7.34EBFB7_at_dfo-mpo.gc.ca...
> What about looking for the file : $ORACLE_HOME/dbs/sgadef<SID>.dbf ?
>
> A number of times Oracle Tech Support has asked me to check to see if that
> exists beore doing anything major to a database.Anytime a database is up
and
> running, that file seems to exist for that given SID.
>
> my $0.02 worth...
>
> James
>
> Jim Gregory wrote:
>
> > I'm trying to write a unix script to be run under cron that needs to
> > determine if a database instance is up on a remote box. This will run
under
> > the oracle user with no root privs and rsh, rlogin, etc. is not
available.
> >
> > So far the only way I've determined how to do this is to try and log
into
> > the remote database via "sqlplus user/pass_at_servicename, and then pipe
the
> > output to grep looking for oracle error ORA 01034 "Oracle not
available".
> >
> > Any one have a better, cleaner solution?
> >
> > Thanks in Advance
> >
> > --
> > Jim Gregory
> > Principal Consultant for Keane, Inc.
> > Currently assigned to NCR
> > "Opinions are my own and do not reflect
> > those of Keane or my clients"
>
Received on Fri Oct 22 1999 - 08:04:45 CDT
![]() |
![]() |