Requirement:
Configure a shell script to monitor alert log for all the databases on a server once in every 15 min.And in the case of any ORA- error mail to the DBA TEAM.

Below script is prepared using the ADRCI utility of oracle 11g. It will monitor alert log for all the databases having same oracle base.

SCRIPT:(Adrci_alert_log.ksh)

###########################################################################################
###### ALERT LOG CHECKING VIA ADRCI #######################################################
######  Author - EXATREE ADMIN   #######################################################
###########################################################################################

LOG_DIR=/export/home/oracle/Housekeeping/logs/alert_log_check_daily.txt
adrci_homes=( $(adrci exec="show homes" | egrep -e rdbms ))
echo '#########################################################################################################' > $LOG_DIR
echo '###########################################ALERT LOG OUTPUT FOR LAST 15 MINUTES ###########################' >> $LOG_DIR
echo '##########################################################################################################' >> $LOG_DIR

for adrci_home in ${adrci_homes[@]}
do

echo ' '>>$LOG_DIR
echo '##########################################################################################################' >> $LOG_DIR
echo '##########################################################################################################' >> $LOG_DIR
echo ' '>>$LOG_DIR
echo $adrci_home' Alert Log' >> $LOG_DIR
adrci exec="set home ${adrci_home}; show alert -p \\\"message_text like '%ORA-%' and originating_timestamp > systimestamp-1/96\\\"""" -term >> $LOG_DIR