Here's a simple set of 2 scripts that we use to check every five minutes if
Oracle is running and send out a page if it isn't:

is_oracle_run:
cd /oracle/alert_mail
check_oracle >is_run
if [ `grep "Oracle is running" is_run|grep -v grep|wc -l` = 0 ]
then
    mail [EMAIL PROTECTED] <alert_message
    mail [EMAIL PROTECTED] <alert_message
fi


check_oracle:
sqlplus username/password@xxxxx <<!
set heading off
set echo off
select 'Oracle is running '||sysdate from dual;
exit
!

alert_message:
Oracle NY is down

-----Original Message-----
Sent: Monday, June 25, 2001 7:45 AM
To: Multiple recipients of list ORACLE-L


Hi,

I'm Running Oracle 8.1.6 on Solaris 2.6.

I want to Run checking scripts every hour, i.e. extents, Tablespace sizes
etc..  
If there is a problem with any of these I want the to be able to email the
output, so that the database can me managed remotely.  
Has anyone got any Ideas what need setting up from the Solaris point of
view, & how best to implement such an Idea, any scripts etc would be handy.

cheers
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: butler, daniel
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Miller, Jay
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to