Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Is Database Up?
amerar_at_iwc.net wrote:
> 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..........
Over the weekend, I had a node that would unendingly lock up any sqlplus call... an obscure hp-ux problem, but still, shows that any technique has potential problems. Took me a while on the node to figure out what was going on (since anything I tried would lock up! kill -9 wouldn't make them go away!), not even close to swapping.
jg
-- @home.com is bogus. Zubkis bupkis! http://www.signonsandiego.com/uniontrib/20060826/news_1b26zubkis.htmlReceived on Mon Aug 28 2006 - 15:41:36 CDT
![]() |
![]() |