Thursday, October 7, 2010

Oracle 11g Automatic Diagonistic Repository

Oracle 11g Automatic Diagonistic Repository

Automatic Diagnostic Repository (ADR)
ADR is a file-based repository for database diagnostic data such as traces, incident dumps and packages, the alert log, Health Monitor reports, core dumps, and more.


Problems and Incidents:

A problem is a critical error in the database. Problems are tracked in ADR. Each problem is identified by a unique problem ID and has a problem key, which is a set of attributes that describe the problem.

An incident is a single occurrence of a problem. When a problem occurs multiple times, as is often the case, an incident is created for each occurrence.

Automatic Daigonistic Repository Command Line Tool: ADRCI

Few ADRCI commands:

Purge the ADRCI data:

purge -age 10080 -type alert
purge -age 10080 -type incident
purge -age 10080 -type trace
purge -age 10080 -type cdump


Show Commands:
show alert
show base
show home
show homes
show problem
show report
show incident

How to upload diagnostic data to Oracle Support :

First collect the data in an incident package. When you create an incident package, you select one or more problems to add to the incident package.

IPS CREATE PACKAGE INCIDENT:
ips create package incident
example:
ips create package incident 1234132432 in /tmp

IPS CREATE PACKAGE PROBLEM:
ips create package problem

example:
ips create package problem 132432 in /tmp


Trace file location in 11g:

To view the trace files location you can query the database view V$DIAG_INFO
The V$DIAG_INFO view lists all important ADR locations including:
ADR Base: Path of ADR base
ADR Home: Path of ADR home for the current database instance
Diag Trace: Location of the text alert log and background/foreground process trace files
Diag Alert: Location of an XML version of the alert log
Default Trace File: Path to the trace file for your session. SQL Trace files are written here.

No comments: