Friday 28 May 2010

11G: AUTOMATIC DIAGNOSTIC REPOSITORY

Whenever critical errors are reported in the database, an incident is automatically created. Oracle collects lots of diagnostic data in the form of Trace and dump files in ADR, which may need to be sent to Oracle support. In order to send all required file for a specific problem or incident, we will use ADRCI or Enterprise Manager.

CREATING PACKAGE USING ADRCI

adrci> show incident
ADR Home = /home/oracle/app/diag/rdbms/orcl/orcl:
*************************************************************************
INCIDENT_ID PROBLEM_KEY CREATE_TIME
-------------------- ----------------------------- ----------------------------------
14773 ORA 1578 2007-08-15 09:08:51.749759 -04:00
14772 ORA 1578 2007-08-15 09:08:41.329081 -04:00
14771 ORA 1578 2007-08-15 09:08:39.554096 -04:00
14770 ORA 1578 2007-08-15 09:08:38.027391 -04:00
14769 ORA 1578 2007-08-15 09:05:38.961166 -04:00
5 rows fetched


adrci> host "ls -ltr /home/oracle/app/diag/rdbms/orcl/orcl"
total 60
drwxr-x--- 2 oracle oinstall 4096 Aug 13 10:39 cdump
drwxr-x--- 2 oracle oinstall 4096 Aug 13 10:39 metadata
drwxr-x--- 2 oracle oinstall 4096 Aug 13 12:34 hm
drwxr-x--- 2 oracle oinstall 4096 Aug 14 09:52 alert
drwxr-x--- 2 oracle oinstall 4096 Aug 14 11:01 ir
drwxr-x--- 2 oracle oinstall 4096 Aug 15 11:33 sweep
drwxr-x--- 2 oracle oinstall 4096 Aug 15 11:33 stage
drwxr-x--- 2 oracle oinstall 4096 Aug 15 11:33 lck
drwxr-x--- 7 oracle oinstall 4096 Aug 15 11:33 incident
drwxr-x--- 7 oracle oinstall 20480 Aug 15 11:35 trace
drwxr-x--- 3 oracle oinstall 4096 Aug 15 12:54 incpkg

Create the Logical Package for incident 14773

adrci> ips create package incident 14773
Created package 1 based on incident id 14773, correlation level typical


This will create a new sub-directory in the ADR_HOME/incpkg directory

adrci> host "ls -ltr /home/oracle/app/diag/rdbms/orcl/orcl/incpkg"
total 4


If you want to add another incident to bundle in the same package, use the following command or
go to next step

adrci> ips add incident 14769 package 1
Added incident 14769 to package 1


If you want to add more additional file to be bundled in the same package

adrci> ips add file /trace/alert_orcl.log package 1
Added file /trace/alert_orcl.log to package 1

Create physical package in the form of ZIP file in specified directory

adrci> ips generate package 1 in /tmp
Generated package 1 in file /tmp/ORA1578_20070815125445_COM_1.zip, mode complete

Verify the Zip file mentioned in the previous output

adrci> host "ls -ltr /tmp/ORA1578_20070815125445_COM_1.zip"
-rw-r--r-- 1 oracle oinstall 2088815 Aug 15 13:13 /tmp/ORA1578_20070815125445_COM_1.zip

Check the Content of the Zip file and you will see that Oracle has added lots of files like
Trace file, Trace Mapping etc

adrci> host "unzip -l /tmp/ORA1578_20070815125445_COM_1.zip"

Archive: /tmp/ORA1578_20070815125445_COM_1.zip
Length Date Time Name
-------- ---- ---- ----
0 08-13-07 10:39 diag/rdbms/orcl/orcl/
52681 08-15-07 09:05 diag/rdbms/orcl/orcl/incident/incdir_14769/orcl_ora_13914_i14769.trm
2053639 08-15-07 09:05 diag/rdbms/orcl/orcl/incident/incdir_14769/orcl_ora_13914_i14769.trc
120355 08-15-07 10:10 diag/rdbms/orcl/orcl/trace/orcl_ora_13914.trc
6583 08-15-07 10:10 diag/rdbms/orcl/orcl/trace/orcl_ora_13914.trm
2053097 08-15-07 09:08 diag/rdbms/orcl/orcl/incident/incdir_14770/orcl_ora_13914_i14770.trc
52510 08-15-07 09:08 diag/rdbms/orcl/orcl/incident/incdir_14770/orcl_ora_13914_i14770.trm
2053051 08-15-07 09:08 diag/rdbms/orcl/orcl/incident/incdir_14771/orcl_ora_13914_i14771.trc
52526 08-15-07 09:08 diag/rdbms/orcl/orcl/incident/incdir_14771/orcl_ora_13914_i14771.trm
52511 08-15-07 09:08 diag/rdbms/orcl/orcl/incident/incdir_14772/orcl_ora_13914_i14772.trm
2053005 08-15-07 09:08 diag/rdbms/orcl/orcl/incident/incdir_14772/orcl_ora_13914_i14772.trc
2053004 08-15-07 09:08 diag/rdbms/orcl/orcl/incident/incdir_14773/orcl_ora_13914_i14773.trc
52536 08-15-07 09:08 diag/rdbms/orcl/orcl/incident/incdir_14773/orcl_ora_13914_i14773.trm
205233 08-15-07 11:35 diag/rdbms/orcl/orcl/trace/alert_orcl.log
730289 08-15-07 11:35 diag/rdbms/orcl/orcl/alert/log.xml


501 08-15-07 13:13 metadata.xml
-------- -------
11822447 83 files

No comments:

Post a Comment