How to use Oracle's ADRCI

ARDCI (Automatic Diagnostic Repository Command Interface) is used to create Incident Package using Incident Package Service, the new Diagnostic utility from 11g database. The incident package thus created is uploaded to Oracle Support for diagnosis to support Service Request (SR).

Step 1: Set ORACLE_HOME and ORACLE_SID

Use . oraenv to set ORACLE_HOME and ORACLE_SID. Using export ORACLE_HOME does not set up PATH variable to use correct Oracle binaries and libraries.

Ensure the variables are set up correctly.

echo $ORACLE_HOME
echo $ORACLE_SID
Step 2: Ensure you are using the correct Oracle Home for the adrci utility

Execute the below command at operating system prompt

$ which adrci
/opt/oracle/product/11.2.0/db/bin/adrci
Step 3: Invoke adrci
$ adrci

ADRCI: Release 11.2.0.1.0 - Production on Mon Apr 2 03:19:26 2012

Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.

ADR base = "/opt/oracle/product/11.2.0"
Step 4: Show home
adrci> show home
ADR Homes:
diag/rdbms/cctgvp3p/cctgvp3p
If “show home” outputs multiple homes, set home using below command :
adrci> set homepath diag/rdbms/cctgvp3p/cctgvp3p
Step 5: Show problem
All ORA- errors generated in alert.log will be displayed in termial when you execute show problem
   
adrci> show problem

ADR Home = /opt/oracle/product/11.2.0/diag/rdbms/cctgvp3p/cctgvp3p:
*************************************************************************
PROBLEM_ID  PROBLEM_KEY            LAST_INCIDENT LASTINC_TIME
----------  ---------------------- ------------- ------------------------------------
1           ORA 600 [kdisle:nrows] 244           2012-04-02 01:50:16.897000 -05:00
1 rows fetched
Step 6: Show incident
To create a package for the problem that we want to send to Oracle Support, adrci command requires an Incident ID. To see the incident ID, execute the command show incident -p as below:
adrci> show incident -p "problem_key='ORA 600 [kdisle:nrows]'"

ADR Home = /opt/oracle/product/11.2.0/diag/rdbms/cctgvp3p/cctgvp3p:
*************************************************************************
INCIDENT_ID       PROBLEM_KEY               CREATE_TIME
----------------- ------------------------- ------------------------------------- 
244               ORA 600 [kdisle:nrows]    2012-04-02 01:50:16.897000 -05:00
1 rows fetched
the above command showed us the incident Id as 244.

Step 7: Use the incident ID to create the package as below :
adrci> ips pack incident 244 in /tmp
Generated package 1 in file /tmp/ORA600kdi_20120402034430_COM_1.zip, mode complete
Please see the command output. It shows us the package ORA600kdi_20120402034430_COM_1.zip is created under /tmp directory.

Step 8: Exit adrci
adrci> exit
Upload the .zip file to Oracle Support.

Other related commands

How to set base directory for ADRCI
adrci> set base /tmp/ora1578
How to set home directory for ADRCI
adrci> set homepath diag/rdbms/db11g/db11g
How to unpack IPS files
adrci>IPS UNPACK file file_name [INTO path]
file_name is the zip file to unpack. path is the directory where the files have to be unpacked. This will be the ADR root directory for all files unpacked.

Reference
11g Quick Steps to Package and Send Critical Error Diagnostic Information to Support [Video] [ID 443529.1]

Also See
ADR Different Methods to Create IPS Package [ID 411.1]
Comments