Wednesday, October 30, 2013

KSH example to look for Oracle errors in the log file and run a script

errno=$(grep ORA- $1|wc -l)
if [[ $errno -gt 0 ]]; then
echo $errno
echo "There are errors in logs"
else
echo "There are no errors in logs"
sqlplus ksomaiy2@usfbdev @MASTER_DBCR.sql
fi

No comments:

Post a Comment