Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Is Database Up?
On 28 Aug 2006 10:48:59 -0700, "amerar_at_iwc.net" <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..........
Please read the posts of Brian Peasland and Ed Stevens and stop building your own OEM.
-- Sybrand Bakker, Senior Oracle DBAReceived on Mon Aug 28 2006 - 13:35:08 CDT