Re: How to determine if Oracle DB is alive from
Date: Mon, 6 Sep 93 13:12:57 GMT
Message-ID: <1993Sep6.131257.1885_at_exlog.com>
In article <1993Sep6.033558.25647_at_amoco.com> zdxc0d_at_amoco.com writes:
>In article 8HD_at_cbnewse.cb.att.com, cafe_at_cbnewse.cb.att.com (richard.dib) writes:
>-->Does anybody know what would be the best way to determine if ORACLE is
>-->up and running? Currently we have a process that will do a "select"
>-->periodicaly and if it works it means that ORACLE is alive and kicking.
>-->I am not sure why we just don't check if the Oracle process are
>-->running (using the "ps" command) and why we are doing this.
>Try
> $ ps -ax |grep ora_
>
>This will either give 1 line (the grep) in which case Oracle is NOT up or
>it will give you the Oracle processes e.g. on our machine we have 5 databases
>and issuning this command gives....
Actually I like the way richard does it now. Checking for the oracle processes will tell you that the db is running but it wont tell you if it is useable. What if it is stuck in dba mode because your export failed? What if you are out of archive space and the system needs to write the online logfiles to disk?
A check of oracle processes would say that the db is up but joe blow user will not be able to get in. I use the following: (or something like it :-})
echo "select 'Working' from dual;" | sqlplus scott/tiger | grep Working
If I get a match, no problem. If not I send a page to the person on duty.
-- Regards, Lee E. Parsons Baker Hughes Inteq, Inc Oracle Database Administrator lparsons_at_exlog.comReceived on Mon Sep 06 1993 - 15:12:57 CEST