Skip to content

ADRCI Commands

December 5, 2012

Oracle 11g got many new features including ADRCI utilty,

ADRCI – Automatic Diagnostics Repository Command Interpreter 

Enter ADRCI command in the OS prompt.

[oracle@TESTDBS ~]$ adrci
ADRCI: Release 11.2.0.1.0 - Production on Wed Dec 5 12:03:54 2012
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
ADR base = "/opt/oracle"
adrci>

Now you are connected to ADRCI Prompt.

Enter help command to get all idea about commands,

HELP [topic]
 Available Topics:
 CREATE REPORT
 ECHO
 EXIT
 HELP
 HOST
 IPS
 PURGE
 RUN
 SET BASE
 SET BROWSER
 SET CONTROL
 SET ECHO
 SET EDITOR
 SET HOMES | HOME | HOMEPATH
 SET TERMOUT
 SHOW ALERT
 SHOW BASE
 SHOW CONTROL
 SHOW HM_RUN
 SHOW HOMES | HOME | HOMEPATH
 SHOW INCDIR
 SHOW INCIDENT
 SHOW PROBLEM
 SHOW REPORT
 SHOW TRACEFILE
 SPOOL
There are other commands intended to be used directly by Oracle, type
 "HELP EXTENDED" to see the list

 Show Home

Enter Show home command,

adrci> show homes
ADR Homes:
diag/tnslsnr/TESTDBS/listener
diag/rdbms/pdb/pdb
diag/rdbms/pdb/repos
diag/rdbms/unknown/pdb
diag/asm/+asm/+ASM

Set Home

Enter set home command for setting the ADR home,

adrci> set home diag/rdbms/pdb/pdb

Show Alert

Show alert for getting alert log.xml entries, in Oracle 11g we have alert xml files,

adrci> show alert -tail -f

Show Problem & Show Incident

Show Problem is referred to a single error and can come many times in alert log. Have Problem ID,PROBLEM_KEY,LAST_INCIDENT        LASTINC_TIME, Say Problem is a concrete of incidents.

PROBLEM_ID PROBLEM_KEY LAST_INCIDENT LASTINC_TIME
-------------------- --------------------------------------------- ----------------------
1 ORA 7445 [dbgrmqmqpk_query_pick_key()+2033] 130242 2012-03-02 04:08:51.865000 +04:00

Show Incident is a group of errors that happened many times in alert log. It has INCIDENT_ID, PROBLEM_KEY,                                        CREATE_TIME

INCIDENT_ID PROBLEM_KEY CREATE_TIME
-------------------- ----------------
130130 ORA 7445 [dbgrmqmqpk_query_pick_key()+2033] 2012-02-24 04:01:13.758000 +04:00
130242 ORA 7445 [dbgrmqmqpk_query_pick_key()+2033] 2012-03-02 04:08:51.865000 +04:00

Show Tracefile & Purge Trace

For getting tracefiles

ADRCI> Show Tracefile -rt
ADRCI> Show Trace <trace_fiel_name>

For purging

adrci> purge -age 2880 -type trace

Show Control

I have already got some tracefiles. How long are they going to stay?

adrci> show control

ADR Home = /u01/app/oracle/diag/rdbms/orcl/orcl:
*************************************************************************
ADRID                SHORTP_POLICY        LONGP_POLICY         LAST_MOD_TIME                            LAST_AUTOPRG_TIME                        LAST_MANUPRG_TIME                        ADRDIR_VERSION       ADRSCHM_VERSION      ADRSCHMV_SUMMARY     ADRALERT_VERSION     CREATE_TIME                              
-------------------- -------------------- ----------
1335663986           720                  8760                 2011-05-27 10:16:46.997118 +02:00

The ordinary tracefiles will stay for 30 days (720 hours), while files like incident files stay one year (8760 hours)by default. We can change that policy with for example:

adrci> set control (SHORTP_POLICY = 360)

adrci> set control (LONGP_POLICY = 2190)

adrci> show control
ADR Home = /u01/app/oracle/diag/rdbms/orcl/orcl:
*************************************************************************
ADRID                SHORTP_POLICY        LONGP_POLICY         LAST_MOD_TIME                            LAST_AUTOPRG_TIME                        LAST_MANUPRG_TIME                        ADRDIR_VERSION       ADRSCHM_VERSION      ADRSCHMV_SUMMARY     ADRALERT_VERSION     CREATE_TIME
-------------------- -------
1335663986           360                  2190                 2011-06-01 11:42:17.208064 +02:00

Creation of Packages & ZIP files to send to Oracle Support

I may not be able to solve the problem myself. Oracle Support will help me with that one. I gather all the required information with a method called “Incident Packaging Service” (IPS):

adrci> ips create package problem 1 correlate all
 Created package 2 based on problem id 1, correlation level all

This did not yet create a ZIP file and is therefore referred to as “Logical Package”. The ZIP file is generated from the Logical Package that was created:

adrci> ips generate package 2 in "/home/oracle"  
Generated package 2 in file /home/oracle/ORA7445qc_20110601112533_COM_1.zip, mode complete

Host

In order to run linux OS commands within ADRCI, type host and put your commands in quotes,

adrci> host "dir"
adrci> host "ls -ltr"

Reference: http://uhesse.com/2011/06/01/adrci-a-survival-guide-for-the-dba/



About these ads

From → ADRCI

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 196 other followers

%d bloggers like this: