Oracle DBA Tips


 

Search OracleDbaTips.com

 

Oracle 11g: Automatic Diagnostic Repository (ADR)

1. Some facts of ADR
  • First introduced in Oracle database 11g. The database, Automatic Storage Management (ASM), Cluster Ready Services (CRS), and other Oracle products or components store all diagnostic data in the ADR.
  • An advanced fault diagnosability infrastructure for collecting and managing diagnostic data
  • A file-based repository stored outside the database, including the alert log, all trace files, dump files, core files, and other diagnostic data.
  • Each instance of each product stores diagnostic data underneath its own ADR home directory.
2. ADR BASE: the ADR root directory, controlled by the Oracle "diagnostic_dest" parameter. The first subdirectory inside an ADR (under the <adr_base> directory) is always named "diag".
  • Any number of instances/components can share same ADR BASE. Under ADR BASE there will be individual ADR HOMES.
  • DIAGNOSTIC_DEST
    • If environment variable ORACLE_BASE is set, DIAGNOSTIC_DEST is set to the directory designated by ORACLE_BASE.
    • If environment variable ORACLE_BASE is not set, DIAGNOSTIC_DEST is set to ORACLE_HOME/log
  • V$DIAG_INFO: query v$diag_info to check its ADR locations, including ADR BASE , ADR home , trace file locations , XML Alert location , incident dump locations , core dump and health monitor reports, number of problems, incidents reported in the database.
3. ADR home: the root directory for all diagnostic data for a particular instance of a particular Oracle product or component.
  • The following directories are under ADR HOME
    • alert: The alert directory contains the XML alert log: log.xml
    • cdump: core dumps are stored in this directory
    • hm : The hm directory stores reports for health checks
    • incident: The incident directory stores dump files created when critical errors are encountered. Each occurrence of a critical error ( incident ) is given its own incident directory, with the incident ID used to form the directory name.
    • incpkg, ir, lck, sweep: These directories contain internal diagnosability framework state.
    • metadata: The metadata directory stores a series of files that contain diagnostic metadata.
    • trace: Process trace files and Alert.log are stored in the trace directory. 'Background_dump_dest' and 'user_dump_dest' are now ignored in 11g. Now all the trace files will be generated in 'trace' directory.
  • diag/product_type/product_id/insance_id

examples:

  • diag/rdbms/orcl/ORCL1/:
    • product_type=rdms
    • product_id=db_name=orcl
    • instance_id=ORACLE_SID=ORCL
  • diag/asm/+asm/+ASM
    • product_type=asm
    • product_id=+asm
    • instance_id=ORACLE_SID=+ASM
  • diag/tnslsnr/node1/listener
    • product_type=tnslsnr - SQL*NET Listener
    • product_id=hostname=node1
    • instance_id=listener name=listener

4. problem versus incident

  • A problem is a critical error in the database: including internal errors, such as ORA-600, and other severe errors, such as ORA-7445 or ORA-4031.
    • Problem key: Every problem has a problem key, which is a text string that includes an error code (such as ORA 600) and in some cases, one or more error parameters. Eg: ‘ORA 4030’ , ‘ORA 600 [ktfacht1-0]’
  • An incident is a single occurrence of a problem. When a problem occurs multiple times, an incident is created for each occurrence.
    • Each incident has a numeric incident id.
  • Only the following Oracle errors can create an incident

Internal errors:

ORA-00600 "internal error code, arguments: [%s], [%s], [%s], [%s], [%s], [%s], [%s], [%s]"
ORA-00700 "soft internal error, arguments: [%s], [%s], [%s], [%s], [%s], [%s], [%s], [%s]"
ORA-07445 "exception encountered: core dump [%s] [%s] [%s] [%s] [%s] [%s]"

Some of the External Errors are:

ORA-04030 "out of process memory when trying to allocate %s bytes (%s,%s)"
ORA-04031 "unable to allocate %s bytes of shared memory (\"%s\",\"%s\",\"%s\",\"%s\")"
ORA-29740 "evicted by member %s, group incarnation %s"
ORA-01578 "ORACLE data block corrupted (file # %s, block # %s)"
ORA-00353 "log corruption near block %s change %s time %s"
ORA-00355 "change numbers out of order"
ORA-00356 "inconsistent lengths in change description"


5. ADR files in Oracle 10g

Diagnostic Data

Previous  Location

ADR Location

Foreground Process Traces

user_dump_dest      

ADR HOME/trace

Background Process Traces

background_dump_dest

ADR HOME/trace

Alert Log File

background_dump_dest

ADR HOME/alert/log.xml
ADR HOME/trace/alert_<SID>.log

SQL*Net Listener Log File

log_directory_listener 

ADR HOME/alert /log.xml

Core Dump Files

core_dump_dest      

ADR HOME/cdump

Incident Dump Files

<user/background>_dump_dest

ADR HOME/incident/incdir_n


6. ADRCI: ADR Command Interpreter
  • An Oracle utility
  • investigating problems, viewing health check reports, and packaging and uploading first-failure diagnostic data to Oracle Support
  • viewing the names of the trace files in ADR and the alert log
7. Errors that trigger Automatic Health Check

Database structure integrity check

Redo integrity check

Data block integrity check

Transaction integrity check

ORA-202
ORA-214
ORA-1103
ORA-312
ORA-313
ORA-1110

ORA-353

ORA-1578

ORA-600 [4136]
ORA-600 [4137]
ORA-600 [4139]
ORA-600 [4140]
ORA-600 [4143]
ORA-600 [4144]
ORA-600 [4152]


8. Unable to view log.xml in a web browser
  • Error when attempting to open the XML formatted alert file log.xml in a web browser such as IE.

The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.


Only one top level element is allowed in an XML document. Error processing resource 'file:///H:/temp/log.xml'. Line 7, Pos...

<msg time='2011-01-06T20:27:09.588-08:00' org_id='oracle' comp_id='tnslsnr'
-^
  • Reason: log.xml is actually not comprised of a single rooted XML document which applications such as Internet Explorer would expect. This file merely contains XML fragments.
9. Recommended reading:

Oracle 11g: About TRM Trace Files
Oracle 11g: ORA-700 Soft Internal Errors


Last updated on January 12, 2011