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

How to recovery PDB when PDB database is dropped in Oracle

  How to recovery PDB when PDB database is dropped :) [oracle@rac01 ~]$ sqlplus '/as sysdba' SQL*Plus: Release 21.0.0.0.0 - Product...