codingbyexamples

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
Posted by KosmoData at 12:09 PM No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Newer Posts Home
Subscribe to: Comments (Atom)

Blog Archive

  • ►  2025 (19)
    • ►  September (1)
    • ►  June (2)
    • ►  May (16)
  • ►  2021 (1)
    • ►  April (1)
  • ►  2014 (1)
    • ►  December (1)
  • ▼  2013 (2)
    • ►  November (1)
    • ▼  October (1)
      • KSH example to look for Oracle errors in the log f...

About Me

KosmoData
View my complete profile
Simple theme. Powered by Blogger.