Disclaimer

Saturday, 23 November 2024

Shell Script for Checking alert log in Oracle

 
check_alertRCC1.sh



$ cat check_alertRCC1.sh

#!usr/bin/bash
tail -f  /home/oracle/admin/RCC/bdump/alert_RCC1.log|
while read -r line
#echo "$line"
do
   ( [[ "$line" != *'Thread'* && "$line" != *'Current'*  && "$line" != *'2013'* &&  "$line" != *'Global Enqueue Services Deadlock detected'* ]] )
 if [ $? -ne 0 ]; then
  echo -e "\033[32m $line \033[0m"
else
   echo -e "\033[41m $line \033[0m"
   echo -e "\07"
 fi
done


Execute the shell script and check the output

$sh check_alertRCC1.sh

No comments:

Post a Comment

Understanding SQL Plan Baselines in Oracle Database

  Understanding SQL Plan Baselines in Oracle Database SQL Plan Baseline is the feature in Oracle started from Database 11g that helps to pre...