<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Looking for Oracle Alert Log shell management scripts. in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/looking-for-oracle-alert-log-shell-management-scripts/m-p/2712230#M947097</link>
    <description>I'm thinking of writing a shell script to evaluate the daily Oracle alert logs and then extract and log non-normal oracle events to the syslog so that the messages can be picked up by our system management tools or action and notification.&lt;BR /&gt;&lt;BR /&gt;Does anyone have something that does something similar to what I'm wanting.  I want to catch the various oracle errors, such as unable to extend, snapshot too old, etc, without needing to review numerous alert logs on a daily basis.&lt;BR /&gt;&lt;BR /&gt;My first thought is to compare the existing alert log against a copy of the log made on a previous day and run diff to catch all changes.    I would then use grep to exclude normal messages, such as begin backup, redo log switches, etc.&lt;BR /&gt;&lt;BR /&gt;Another idea may be to have a script run tail against the alert log, pipe the output to use the logger application to add the timestamp.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;jack...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;jack...</description>
    <pubDate>Fri, 26 Apr 2002 17:51:23 GMT</pubDate>
    <dc:creator>Jack C. Mahaffey</dc:creator>
    <dc:date>2002-04-26T17:51:23Z</dc:date>
    <item>
      <title>Looking for Oracle Alert Log shell management scripts.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/looking-for-oracle-alert-log-shell-management-scripts/m-p/2712230#M947097</link>
      <description>I'm thinking of writing a shell script to evaluate the daily Oracle alert logs and then extract and log non-normal oracle events to the syslog so that the messages can be picked up by our system management tools or action and notification.&lt;BR /&gt;&lt;BR /&gt;Does anyone have something that does something similar to what I'm wanting.  I want to catch the various oracle errors, such as unable to extend, snapshot too old, etc, without needing to review numerous alert logs on a daily basis.&lt;BR /&gt;&lt;BR /&gt;My first thought is to compare the existing alert log against a copy of the log made on a previous day and run diff to catch all changes.    I would then use grep to exclude normal messages, such as begin backup, redo log switches, etc.&lt;BR /&gt;&lt;BR /&gt;Another idea may be to have a script run tail against the alert log, pipe the output to use the logger application to add the timestamp.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;jack...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;jack...</description>
      <pubDate>Fri, 26 Apr 2002 17:51:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/looking-for-oracle-alert-log-shell-management-scripts/m-p/2712230#M947097</guid>
      <dc:creator>Jack C. Mahaffey</dc:creator>
      <dc:date>2002-04-26T17:51:23Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for Oracle Alert Log shell management scripts.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/looking-for-oracle-alert-log-shell-management-scripts/m-p/2712231#M947098</link>
      <description>FWIW I highly recommend the every5 script found in "Oracle Scripts" published by O'Reily.  It's copyrighted, hence I will not provide it -- but I've relied upon it for about three years now.&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Dave</description>
      <pubDate>Sat, 27 Apr 2002 16:53:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/looking-for-oracle-alert-log-shell-management-scripts/m-p/2712231#M947098</guid>
      <dc:creator>VanZandt, David</dc:creator>
      <dc:date>2002-04-27T16:53:22Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for Oracle Alert Log shell management scripts.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/looking-for-oracle-alert-log-shell-management-scripts/m-p/2712232#M947099</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;If you shutdown the db over night for backup then you can do something very easy. Just create a daily copy of the alert file and clear the alert file with cat /dev/null &amp;gt; "alertfile" . After that start the db instance . If you add the systemdate to the file name of the copy you created you will get daily alert files containing only messages of the actual day.&lt;BR /&gt;To do this you should take care on permissions of the alert file. Tha copy made can be added easily to the systemlog in different ways. The most easy way is just to do :&lt;BR /&gt;cat "alertfile" &amp;gt;&amp;gt; syslog.log.&lt;BR /&gt;I think it's easier at all to isolate the logentries on a daily basis then to try to extract them out of a big file</description>
      <pubDate>Mon, 29 Apr 2002 05:28:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/looking-for-oracle-alert-log-shell-management-scripts/m-p/2712232#M947099</guid>
      <dc:creator>Reinhard Burger</dc:creator>
      <dc:date>2002-04-29T05:28:50Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for Oracle Alert Log shell management scripts.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/looking-for-oracle-alert-log-shell-management-scripts/m-p/2712233#M947100</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;this is dbalert&lt;BR /&gt;-----------------------&lt;BR /&gt;TMP_FILE=${TMP_PATH}/${1}_${TNSNAME}.tmp.${TIMESTAMP}&lt;BR /&gt;SQL_FILE=${HOME_DIR}/${1}.sql&lt;BR /&gt;&lt;BR /&gt;echo "====================================================" | tee -a ${TMP_FILE}&lt;BR /&gt;echo "${2}, ${ORACLE_SID}@${HOSTNAME}" | tee -a ${TMP_FILE}&lt;BR /&gt;echo "====================================================" | tee -a ${TMP_FILE}&lt;BR /&gt;&lt;BR /&gt;if [ ! -f ${SQL_FILE} ]; then&lt;BR /&gt;        echo "SQL file ${SQL_FILE} not found."&lt;BR /&gt;        echo ""&lt;BR /&gt;else&lt;BR /&gt;        BACKDUMP=`sqlplus -s ${ORACLE_USER}/${USER_PASSWORD}@${TNSNAME}                                 &amp;lt; ${SQL_FILE} | egrep -i "[a-z]|[0-9]"`&lt;BR /&gt;        ALERT_FILE=${BACKDUMP}/alert_${ORACLE_SID}.log&lt;BR /&gt;        echo "Alert file ${ALERT_FILE}" | tee -a ${TMP_FILE}&lt;BR /&gt;        if [ -f ${ALERT_FILE} ]; then&lt;BR /&gt;                grep "ORA-" ${ALERT_FILE} | awk '{ print "==&amp;gt; "$0 }' | tee -a ${&lt;BR /&gt;TMP_FILE}&lt;BR /&gt;                mv ${ALERT_FILE} ${ALERT_FILE}.${TIMESTAMP}&lt;BR /&gt;                echo "Rename to ${ALERT_FILE}.${TIMESTAMP}" | tee -a ${TMP_FILE}&lt;BR /&gt;                MONTHSTAMP=`date "+%Y%m"`&lt;BR /&gt;                cat ${ALERT_FILE}.${TIMESTAMP} &amp;gt;&amp;gt; ${ALERT_FILE}.mon${MONTHSTAMP}&lt;BR /&gt;echo "Append to ${ALERT_FILE}.mon${MONTHSTAMP}"                                                         | tee -a ${TMP_FILE}&lt;BR /&gt;        else&lt;BR /&gt;                echo "Not found." | tee -a ${TMP_FILE}&lt;BR /&gt;        fi&lt;BR /&gt;        echo "" | tee -a ${TMP_FILE}&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;date "+Finished: %Y.%m.%d-%H:%M:%S" | tee -a ${TMP_FILE}&lt;BR /&gt;echo "" | tee -a ${TMP_FILE}&lt;BR /&gt;&lt;BR /&gt;NEW_LINE=`grep "==&amp;gt; " ${TMP_FILE} | wc -l`&lt;BR /&gt;if [ ${NEW_LINE} -gt 0 ]; then&lt;BR /&gt;        echo "Mail or Page DataBase Administrator ..."&lt;BR /&gt;        for MAIL_ADDRESS in `cat ${MAIL_FILE} | awk '{ print $1 }'`; do&lt;BR /&gt;                echo "${2} '${ORACLE_SID}@${HOSTNAME}'" &amp;gt;&amp;gt; ${TMP_FILE}&lt;BR /&gt;                echo "Mail to '${MAIL_ADDRESS}'"&lt;BR /&gt;                mail "${MAIL_ADDRESS}" &amp;lt; ${TMP_FILE}&lt;BR /&gt;        done&lt;BR /&gt;        echo ""&lt;BR /&gt;fi&lt;BR /&gt;-------------------------------------------&lt;BR /&gt;this is dbalert.sql&lt;BR /&gt;set heading off&lt;BR /&gt;&lt;BR /&gt;SELECT value&lt;BR /&gt;FROM   V$PARAMETER&lt;BR /&gt;WHERE  name = 'background_dump_dest';&lt;BR /&gt;-----------------------------------------&lt;BR /&gt;make modification as needed.</description>
      <pubDate>Mon, 29 Apr 2002 06:14:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/looking-for-oracle-alert-log-shell-management-scripts/m-p/2712233#M947100</guid>
      <dc:creator>Printaporn_1</dc:creator>
      <dc:date>2002-04-29T06:14:57Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for Oracle Alert Log shell management scripts.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/looking-for-oracle-alert-log-shell-management-scripts/m-p/2712234#M947101</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;This can also be done using the Alert Event in Oracle Enterprise Manager.&lt;BR /&gt;You get a alert for each new Warnig or Alert in the alert.log since last alert.&lt;BR /&gt;&lt;BR /&gt;rgds&lt;BR /&gt;Andreas&lt;BR /&gt;&lt;BR /&gt;(will he never stop advocating the OEM...)</description>
      <pubDate>Mon, 29 Apr 2002 06:27:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/looking-for-oracle-alert-log-shell-management-scripts/m-p/2712234#M947101</guid>
      <dc:creator>Andreas D. Skjervold</dc:creator>
      <dc:date>2002-04-29T06:27:41Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for Oracle Alert Log shell management scripts.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/looking-for-oracle-alert-log-shell-management-scripts/m-p/2712235#M947102</link>
      <description>Shutting down the database is not an option.  I also currently don't have access to the OReily publication.&lt;BR /&gt;&lt;BR /&gt;Thanks...</description>
      <pubDate>Mon, 29 Apr 2002 11:19:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/looking-for-oracle-alert-log-shell-management-scripts/m-p/2712235#M947102</guid>
      <dc:creator>Jack C. Mahaffey</dc:creator>
      <dc:date>2002-04-29T11:19:35Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for Oracle Alert Log shell management scripts.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/looking-for-oracle-alert-log-shell-management-scripts/m-p/2712236#M947103</link>
      <description>The dbalert script is closer to what I'm looking for.  I see the script separates the log entries on a daily basis.  &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I'll test the script and see if it's what I need.&lt;BR /&gt;&lt;BR /&gt;Thanks...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;As for OEM...  I love OEM, but it does have it's limitations and I was looking for using a local script.&lt;BR /&gt;&lt;BR /&gt;I've had problems with OEM anytime I change the IP address and failover to another server.  The job scripts had to be re-created.&lt;BR /&gt;&lt;BR /&gt;jack...</description>
      <pubDate>Mon, 29 Apr 2002 12:47:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/looking-for-oracle-alert-log-shell-management-scripts/m-p/2712236#M947103</guid>
      <dc:creator>Jack C. Mahaffey</dc:creator>
      <dc:date>2002-04-29T12:47:24Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for Oracle Alert Log shell management scripts.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/looking-for-oracle-alert-log-shell-management-scripts/m-p/2712237#M947104</link>
      <description>Here's what I've done on an interim basis to at least copy the oracle messages to syslog.log.&lt;BR /&gt;&lt;BR /&gt;I've created a script in /sbin/init.d that does the following:&lt;BR /&gt;&lt;BR /&gt;for n in db1 db2 db3 db4&lt;BR /&gt;  do&lt;BR /&gt;   nohup tail -f ${ORACLE_ADMIN}/$n/bdump/alert_${n}.log | logger &amp;amp;&lt;BR /&gt;  done&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;This will give me timetamps attached to each event and allows me to write other scripts for catching events.&lt;BR /&gt;&lt;BR /&gt;I've tried adding awk to the command, but had no luck.&lt;BR /&gt;&lt;BR /&gt;jack...</description>
      <pubDate>Tue, 30 Apr 2002 13:58:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/looking-for-oracle-alert-log-shell-management-scripts/m-p/2712237#M947104</guid>
      <dc:creator>Jack C. Mahaffey</dc:creator>
      <dc:date>2002-04-30T13:58:03Z</dc:date>
    </item>
  </channel>
</rss>

