Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Is Database Up?
Radoulov, Dimitre wrote:
> > 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........
>
> No need to grep:
>
> printf "%s\n%s\n" "whenever sqlerror exit failure" "select null from
> dual;"|sqlplus -L user/pass_at_service_name >/dev/null 2>&1||echo "Database NOT
> accessible\!"
>
>
> Regards
> Dimitre
Very slick.....I like that.......... Received on Mon Aug 28 2006 - 12:48:59 CDT