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

Index rebuild online in Oracle - shell script

  [oracle@rac10p reorg]$ cat index_rebuild_EMP.sh #!/bin/ksh export ORACLE_HOME=/oracle/K12/19 export ORACLE_SID=K12 export PATH=$PATH:/$ORA...