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: Radoulov, Dimitre <dradoulov_at__gmail.com>
Date: Mon, 28 Aug 2006 19:27:18 +0200
Message-ID: <44f32777$0$75030$14726298@news.sunsite.dk>


> 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 Received on Mon Aug 28 2006 - 12:27:18 CDT

Original text of this message

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