Oracle Automatic Diagnostic archives (ADR), automatic diagnostic workflows, and ADRCI tools
. Automatic diagnosis workflow:
With a memory tracking tool that is always on, the database component can capture diagnostic data when a serious error occurs for the first time. The system automatically maintains a special archive named "Automatic Diagnostic Archive" to save the diagnostic information for critical error events. This information can be used to create an unexpected event package to be sent to the Oracle Support Service for investigation.
The following is a typical diagnostic session workflow:
1) An unexpected event causes an alert in Oracle Enterprise Manager (EM.
2) DBA can view this Alert on the "Alert (Alert)" page of EM.
3) DBA can refine the details of incidents and problems.
4) the DBA may decide or the Oracle Support Service may require that information be packaged and sent to the Oracle Support Service through MetaLink. DBA can add files to automatically packaged data.
2. Automatic Diagnostic archives (ADR)
ADR is a file-based archive for storing database diagnostic data (such as tracking, accident dump and packages, warning logs, health monitoring reports, and core dump ). It uses a unified directory structure for multiple instances and products stored outside any database. Therefore, you can diagnose problems when the database is closed.
From Oracle Database 11g R1, Database, Automatic Storage Management (ASM), cluster ready Service (CRS), and other Oracle products or components store all diagnostic data in ADR. Each instance of each product stores diagnostic data in its own ADR home directory. For example, in a Real Application Clusters environment with shared storage and ASM, each database instance and each ASM instance have a main directory in ADR.
Using the unified directory structure of ADR, the unified diagnostic data format for various products and instances, and a set of unified tools, the customer and Oracle technical support can associate and analyze the diagnostic data of multiple instances.
The ADR root directory is also called the ADR base directory. Its location is set by the DIAGNOSTIC_DEST initialization parameter. If this parameter is ignored or left null, the database will set DIAGNOSTIC_DEST as follows at startup: if the environment variable ORACLE_BASE is set, DIAGNOSTIC_DEST is set to $ ORACLE_BASE. If the environment variable ORACLE_BASE is not set, set DIAGNOSTIC_DEST to $ ORACLE_HOME/log.
3. ADRCI
ADRCI is a command line tool that is part of the basic structure of database fault diagnosis.
ADRCI can interact with ADR through an operating system prompt.
You can use ADRCI to view the diagnostic data in the automatic diagnostic data portfolio.
You can use ADRCI:
-- View the diagnostic data in the automatic diagnosis archive (ADR)
-- Package accident and problem information into a zip file and transfer it to Oracle Technical Support
ADRCI has a rich set of commands that can be used in interactive mode or in scripts. In addition, ADRCI can run the ADRCI Command Script in the same way as SQL * Plus and PL/SQL commands.
$ Adrci
ADRCI: Release 11.1.0.5.0-On Sat Jul 7 08:01:40 2007
Copyright (c) 1982,200 7, Oracle. All rights reserved.
ADR base = "/u01/app/oracle"
ADRCI> show incident
ADR Home =/u01/app/oracle/product/11.1.0/db_1/log/diag/rdbms/orcl:
**************************************** **********************************
INCIDENT_ID PROBLEM_KEY CREATE_TIME
-----------------------------------------------------------------------
1681 ORA-600_dbgris01: 1, _ addr = 0xa9876541 17-JAN-07 09.17.44.843125...
1682 ORA-600_dbgris01: 12, _ addr = 0xa9876542 18-JAN-07 09.18.59.42.1675...
2 incident info records fetched
4. V $ DIAG_INFO View
SQL> SELECT * FROM V $ DIAG_INFO;
NAME VALUE
--------------------------------------------------------------------
Diag Enabled TRUE
ADR Base/u01/app/oracle
ADR Home/u01/app/oracle/diag/rdbms/orcl
Diag Trace/u01/app/oracle/diag/rdbms/orcl/trace
Diag Alert/u01/app/oracle/diag/rdbms/orcl/alert
Diag Incident/u01/app/oracle/diag/rdbms/orcl/incident
Diag Cdump/u01/app/oracle/diag/rdbms/orcl/cdump
Health Monitor/u01/app/oracle/diag/rdbms/orcl/hm
Default Trace File/u01/app/oracle/diag/.../trace/orcl_ora_112.16.trc
Active Problem Count 3
Active Incident Count 8
The V $ DIAG_INFO view lists all important ADR locations:
ADR Base: the path of the ADR Base directory.
ADR Home: the path of the ADR Home directory of the current database instance.
Diag Trace: the location of the text warning log and background/foreground process Trace file.
Diag Alert: Location of warning logs in XML version.
Diag Incident: the location where the unexpected event logs are written.
Diag Cdump: Write diagnostic core files in this directory.
Health Monitor: the location of logs generated during Health monitoring.
Default Trace File: path of the session Trace File. Write SQL trace files to this location.
5. Oracle 10g and Oracle 11g diagnostic Tracking Location
Location before diagnosis data ADR location
Foreground Process Tracking USER_DUMP_DEST ADR_HOME/trace
BACKGROUND_DUMP_DEST ADR_HOME/trace
Warning log data BACKGROUND_DUMP_DEST ADR_HOME/alert ADR_HOME/trace
Core Dump CORE_DUMP_DEST ADR_HOME/cdump
Accidental event dump USER | BACKGROUND_DUMP_DEST ADR_HOME/incident/incdir_n