What is ADR ?
The Automatic Diagnostic Repository (ADR) is a file-based repository for storing diagnostic data.
Because this repository is stored outside the database, the diagnostic data is available even when the database is down. As of Release 11g, the alert log, all trace and dump files, and other diagnostic data are also stored in the ADR.
[JDB01] oracle@jdbdb01:/home/oracle> adrci
ADRCI: Release 11.2.0.3.0 - Production on Mon Feb 4 09:44:36 2011
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
ADR base = "/u01/app/oracle"
adrci> help
adrci> show incident
ADR Home = /u01/app/oracle/diag/tnslsnr/jdbdb01/listener_asm:
*************************************************************************
0 rows fetched
ADR Home = /u01/app/oracle/diag/tnslsnr/jdbdb01/listener:
*************************************************************************
0 rows fetched
ADR Home = /u01/app/oracle/diag/tnslsnr/jdbdb01/listener_JDB01:
*************************************************************************
0 rows fetched
ADR Home = /u01/app/oracle/diag/asm/+asm/+ASM:
*************************************************************************
0 rows fetched
ADR Home = /u01/app/oracle/diag/rdbms/JDB01/JDB01:
*************************************************************************
INCIDENT_ID PROBLEM_KEY CREATE_TIME
-------------------- ----------------------------------------------------------- ----------------------------------------
31641 ORA 600 [kkdlGetBaseUser2:authIdType] 2012-12-17 16:35:42.023000 -05:00
31649 ORA 600 [kkdlGetBaseUser2:authIdType] 2012-12-17 16:35:42.023000 -05:00
31697 ORA 600 [kkdlGetBaseUser2:authIdType] 2012-12-17 16:35:42.023000 -05:00
31673 ORA 600 [kkdlGetBaseUser2:authIdType] 2012-12-17 16:35:42.023000 -05:00
31705 ORA 600 [kkdlGetBaseUser2:authIdType] 2012-12-17 16:35:42.048000 -05:00
31637 ORA 600 [kokuxpout3] 2011-01-10 12:27:33.189000 -05:00
31638 ORA 600 [kokuxpout3] 2011-01-10 12:35:01.472000 -05:00
31639 ORA 600 [kokuxpout3] 2011-01-10 13:25:15.446000 -05:00
31640 ORA 600 [kokuxpout3] 2011-01-10 13:27:28.127000 -05:00
35203 ORA 600 [kokuxpout3] 2011-01-10 13:29:28.606000 -05:00
10 rows fetched
adrci> show homes
ADR Homes:
diag/tnslsnr/jdbdb01/listener_asm
diag/tnslsnr/jdbdb01/listener
diag/tnslsnr/jdbdb01/listener_JDB01
diag/asm/+asm/+ASM
diag/rdbms/JDB01/JDB01
adrci> set home diag/rdbms/JDB01/JDB01
adrci> ips create package
Created package 1 without any contents, correlation level typical
adrci> ips add incident 31641 package 1
Added incident 31641 to package 1
adrci> show incident -mode detail -P "incident_id=31641"
adrci> ips generate package 1 in /tmpGenerated package 1 in file /tmp/IPSPKG_20130204100436_COM_1.zip, mode complete
>>> send to ORACLE SUPPORT
adrci> show problemADR Home = /u01/app/oracle/diag/rdbms/jdb01/JDB01:
*************************************************************************
PROBLEM_ID PROBLEM_KEY LAST_INCIDENT LASTINC_TIME
-------------------- ----------------------------------------------------------- -------------------- ----------------------------
1 ORA 353 [67584] [68050001] 20994 2013-01-22 08:10:08.191000 -05:00
2 ORA 353 [104448] [68159717] 20995 2013-01-22 09:10:53.548000 -05:00
3 ORA 353 [79872] [68172859] 20996 2013-01-22 10:10:13.847000 -05:00
4 ORA 353 [118784] [68177937] 20997 2013-01-22 11:10:14.386000 -05:00
5 ORA 353 [258048] [71472299] 20999 2013-01-23 06:10:03.496000 -05:00
5 rows fetched
adrci> show problemADR Home = /u01/app/oracle/diag/rdbms/jdb01/JDB01:
*************************************************************************
PROBLEM_ID PROBLEM_KEY LAST_INCIDENT LASTINC_TIME
-------------------- ----------------------------------------------------------- -------------------- ----------------------------1 ORA 353 [67584] [68050001] 20994 2013-01-22 08:10:08.191000 -05:00
2 ORA 353 [104448] [68159717] 20995 2013-01-22 09:10:53.548000 -05:00
3 ORA 353 [79872] [68172859] 20996 2013-01-22 10:10:13.847000 -05:00
4 ORA 353 [118784] [68177937] 20997 2013-01-22 11:10:14.386000 -05:00
5 ORA 353 [258048] [71472299] 20999 2013-01-23 06:10:03.496000 -05:00
5 rows fetched
adrci> IPS CREATE PACKAGE PROBLEM 1;Created package 2 based on problem id 1, correlation level typical
or
adrci> IPS CREATE PACKAGE PROBLEMKEY "ORA 353 [67584] [68050001]"Created package 1 based on problem key ORA 353 [67584] [68050001], correlation level typical
adrci> show control
ADR Home = /u01/app/oracle/diag/rdbms/qntp01/QNTP01:
*************************************************************************
ADRID SHORTP_POLICY LONGP_POLICY LAST_MOD_TIME LAST_AUTOPRG_TIME LAST_MANUPRG_TIME ADRDIR_VERSION ADRSCHM_VERSION ADRSCHMV_SUMMARY ADRALERT_VERSION CREATE_TIME
-------------------- -------------------- -------------------- ---------------------------------------- ---------------------------------------- ---------------------------------------- -------------------- -------------------- -------------------- -------------------- ----------------------------------------
1807762298 720 8760 2012-12-01 23:14:57.437655 -05:00 2013-01-30 15:12:42.603362 -05:00 1 2 80 1 2012-12-01 23:14:57.437655 -05:00
1 rows fetched
LONGP_POLICY (long term) defaults to 365 (8760 hrs) days for Incidents and Health Monitor warnings
SHORTP_POLICY (short term) defaults to 30 (720 hrs) days for trace and core dump files
Setup auto purge - Purge after 60 Hrs:
adrci> set control (SHORTP_POLICY = 60)
adrci> set control (LONGP_POLICY = 60)
Manual Purge:
purge -age 129600 -type ALERT ( purging ALERT older than 90 days)
purge -age 43200 -type INCIDENT (purging INCIDENT older than 30 days)
purge -age 43200 -type TRACE ( purging TRACE older than 30 days)
purge -age 43200 -type CDUMP ( purging CDUMP older than 30 days)
purge -age 43200 -type HM ( purging HM older than 30 days)
or
$ORACLE_HOME/bin/adrci exec="set base /data/$DB;set homepath $file_line;purge -age 129600 -type ALERT"
select * from v$diag_info ; INST_ID NAME VALUE
---------- -----------------------------------------------------------------------
1 Diag Enabled TRUE
1 ADR Base /u01/app/oracle
1 ADR Home /u01/app/oracle/diag/rdbms/hmwhist/JDB
1 Diag Trace /u01/app/oracle/diag/rdbms/JDB/JDB/trace
1 Diag Alert /u01/app/oracle/diag/rdbms/JDB/JDB/alert
1 Diag Incident /u01/app/oracle/diag/rdbms/JDB/JDB/incident
1 Diag Cdump /u01/app/oracle/diag/rdbms/JDB/JDB/cdump
1 Health Monitor /u01/app/oracle/diag/rdbms/JDB/JDB/hm
1 Default Trace File /u01/app/oracle/diag/rdbms/JDB/JDB/trace/JDB_ora_13742.trc
1 Active Problem Count 0
1 Active Incident Count 0
11 rows selected.
SELECT run_id, name, check_name, run_mode, status, error_number FROM gv$hm_run;
RUN_ID NAME CHECK_NAME RUN_MODE STATUS ERROR_NUMBER
---------- -------------------------------- -------------------------------- -------- ----------- ------------
35161 HM_RUN_35161 Redo Integrity Check REACTIVE COMPLETED 0
35201 HM_RUN_35201 Redo Integrity Check REACTIVE COMPLETED 0
35941 HM_RUN_35941 Redo Integrity Check REACTIVE COMPLETED 0
35981 HM_RUN_35981 Redo Integrity Check REACTIVE COMPLETED 0
.....................
2380 rows selected.
No comments:
Post a Comment