Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Is database up
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 Thu Oct 21 1999 - 12:39:10 CDT