Can I use OEM to check the Alert.log file errors
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: Can I use OEM to check the Alert.log file errors

  1. #1
    Join Date
    Jul 2002
    Posts
    205

    Can I use OEM to check the Alert.log file errors

    I am interested to check the alert.log file using OEM. I am using Oracle 9.2.0.6. If there is any error in alert.log, then Oracle Enterprise Manager should Email me.

    Is it possible..?

  2. #2
    Join Date
    Mar 2002
    Location
    Mesa, Arizona
    Posts
    1,204
    If your on Li/Unix run this script from an OEM job:

    #!/bin/bash

    ORACLE_SID=
    export ORACLE_SID
    ORACLE_HOME=
    export ORACLE_HOME

    cd /u1/oracle/admin/$ORACLE_SID/bdump
    #you may want to make a common place for sym links to all your alert logs
    files="alert_*.log"
    for file in $(find $files)
    do
    DT=$(date)
    awk '
    BEGIN {Flg=0}
    NR==1 {R=split(DATE,TMP," ")
    Day=TMP[1]
    Month=TMP[2]
    NoDay=TMP[3]}
    {NoDayM=NoDay-1}
    NF==5 && $2==Month && ( $3==(NoDayM) || $3==NoDay ) {Flg=1}
    Flg==1 {print $0}
    ' DATE="$DT" $file | awk '
    /^ORA-/ || /cannot/ {print DATE
    print $0}
    NF==5 {DATE=$0}
    '
    done
    exit 0

    Emailing the output is simply a matter of piping the output through your favorite email binary or let OEM send it.

    Hope this helps,
    Ken
    "I do not fear computers. I fear the lack of them." Isaac Asimov
    Oracle Scirpts DBA's need

  3. #3
    Join Date
    Jul 2002
    Posts
    205
    I am using Sun Solaris. Any one has script for this activity to put in OEM..

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width