DBASupport

 The Knowledge Center for Oracle Professionals
HOME 11g Central 10g Central 9i Central 8i Central Oracle News Scripts FAQ OCP Zone Resources Technical Docs Tools & Utilities Forums

» HOME
» FEATURES
    11g Central
    10g Central
    9i Central
    8i Central
    Oracle News
» COMMUNITY
    Scripts
    Forums
    FAQ
    OCP Zone
» RESOURCES
    Resources
    Technical Docs
    Tools & Utilities
    Tech Jobs
Marketplace Partners
Become a Marketplace Partner






Internet News
Small Business

Advertise
Newsletters
Tech Jobs
E-mail Offers


   DBAsupport.com > Oracle > Oracle 11g Central > Featured Stories



 

Oracle Developer Jr - READY TO HIRE!
Next Step Systems
US-CA-Thousand Oaks

Justtechjobs.com Post A Job | Post A Resume

Alert Log Scraping with Oracle’s ADRCI Utility
James Koopmann, jkoopmann@pinehorse.com


Oracle’s new ADR with command interface shows promise for database administrators who like to script their own solution for quickly scraping the alert log and automatically looking for errors.


Oracle’s alert log is a chronological log of important messages and errors that are generated using an Oracle database. Quite often it's the first place DBAs check to see if there are errors being generated or to see if the Oracle database is healthy and not spitting out errors and complaining about something. If you have have never seen an alert log, below is a snippet of some of the errors (ORA-) and messages that you will find in the alert log. I’ve included two different snippets. One is a pure text file, and one that is new to many, an XML alert log. Both are generated but the prior is, as suggested by Oracle, not being maintained and not receiving the same messaging as the XML alert log.

From the text alert log:

Wed Dec 09 14:55:16 2009
    Errors in file /opt/app/oracle/diag/rdbms/db11/db11/trace/db11_ora_14798.trc:
    ORA-00313: open failed for members of log group 3 of thread 1
    ORA-00312: online log 3 thread 1: '/oradata/db11/redo03.log'
    ORA-27037: unable to obtain file status
    Linux Error: 2: No such file or directory
    Additional information: 3
  

From the XML alert log:

< msg time='2009-12-09T14:55:16.441-07:00' org_id='oracle' comp_id='rdbms'
    client_id='' type='UNKNOWN' level='16'
    module='sqlplus@ludwig (TNS V1-V3)' pid='14798'>
<txt>Errors in file /opt/app/oracle/diag/rdbms/db11/db11/trace/db11_ora_14798.trc:
    ORA-00313: open failed for members of log group 3 of thread 1
    ORA-00312: online log 3 thread 1: &apos;/oradata/db11/redo03.log&apos;
    ORA-27037: unable to obtain file status
    Linux Error: 2: No such file or directory
    Additional information: 3
</txt>
< /msg>

Clearly, these logs are very similar except for the XML tags. These XML tags cause some interesting problems for those of us that like to scrape the alert log with system utilities. It isn’t as easy as pointing the scripts at a new file out on disk. Thankfully Oracle has provided a utility (ADRCI) that can be used to extract diagnostic information generated from an Oracle database, including the alert log.

View article


Back to DBAsupport.com





[an error occurred while processing this directive]