Home > Oracle DBA > Oracle Utilities – ADRCI

Oracle Utilities – ADRCI

January 20, 2014

Automatic Diagnostic Repository Command Interface (ADRCI)

ADRCI is a command line tool for managing Oracle’s Diagnostic data – whenever a problem is encountered in database, we diagnose by looking at various locations like alert logs, trace files, dumps etc., It’s been a nice thing if we were able to manage all the logs at one place. ADRCI provides that kind of ability i.e. able to manage all logs/traces from single place.

Let us explore the options available in ADRCI.

1) To enter into ADRCI, just set the ENV and run adrci.

a) . ./set11g(This is env for my DB).
b) adrci
—————-
$ . ./set11g
$ adrci
ADRCI: Release 11.2.0.3.0 – Production on Mon Jan 20 00:06:26 2014
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
ADR base = “/u01/app/oracle”
adrci>
—————-

2) set ADR homepath – if you have multiple instances then you will have multiple homes, so to focus on a single ADR home, you must set the homepath to a single ADR home directory. This can be done as follows –

—————————————————————-
adrci> show homes
ADR Homes:
diag/rdbms/orcl11g/orcl11g
diag/tnslsnr/rsvmsb260/listener
adrci> set homepath diag/rdbms/orcl11g/orcl11g
adrci> show homes
ADR Homes:
diag/rdbms/orcl11g/orcl11g
adrci>
—————————————————————-

3) To check the alert log,

adrci> show alert

ADR Home = /u01/app/oracle/diag/rdbms/orcl11g/orcl11g:
*************************************************************************
Output the results to file: /tmp/alert_11671_4693_orcl11g_2.ado
2014-01-02 04:25:48.466000 -05:00
Starting ORACLE instance (normal)
LICENSE_MAX_SESSION = 0

..
..
..

Note:- here you need use our regular vi commands to navigate through alert.log

4) To get the contents of the alert with filer. you can try below option.
————————-
adrci> show alert -P “MESSAGE_TEXT LIKE ‘%ORA-%'”

ADR Home = /u01/app/oracle/diag/rdbms/orcl11g/orcl11g:
*************************************************************************
Output the results to file: /tmp/alert_11671_4693_orcl11g_3.ado
2014-01-02 04:27:04.006000 -05:00
ORA-1109 signalled during: ALTER DATABASE CLOSE NORMAL…
2014-01-02 04:27:13.223000 -05:00
Errors in file /u01/app/oracle/diag/rdbms/orcl11g/orcl11g/trace/orcl11g_ora_2095.trc:
ORA-00313: open failed for members of log group 1 of thread 1
ORA-00312: online log 1 thread 1: ‘/u01/app/oradata/orcl11g/orcl11g/redo01.log’
ORA-27037: unable to obtain file status
—————————

5) To show the incidents, you can try below option.
—————————
adrci> show incidents
ADR Home = /u01/app/oracle/diag/rdbms/orcl11g/orcl11g:
**************************************************************
INCIDENT_ID PROBLEM_KEY CREATE_TIME
——————– —————————————–
161 ORA 227 2013-05-25 18:20:46.735000 +08:00
162 ORA 227 2013-05-25 18:21:49.522000 +08:00
2 rows fetched
—————————

6) To get more details on the specific incident you can try below command(Since i do not have incidents in my DB) taking from other sites.

—————————
adrci> show incident -mode DETAIL -p “incident_id=161”

—————————

7) Packages can be created based on Incident ID’s or Problem keys or also using time. So with the help of Incident Packaging Service (IPS) we can create the packages –

adrci> IPS CREATE PACKAGE INCIDENT 161
Created package 1 based on incident id 161,correlation level typical
adrci>

8) Different other options available through IPS,

You can add/remove new incidents or files to the created package –

adrci> IPS ADD INCIDENT 162 PACKAGE 1
Added incident 162 to package 1
adrci>

9) Adding/Removing other files to/from package.
——————————
adrci> IPS ADD FILE c:\app\..\orcl_m000_416_i161.trc PACKAGE 1
Added file c:\app..\orcl_m000_416_i161.trc to package 1
adrci> ips remove file c:\..\alert_orcl.log package 1;
Removed file c:\..\alert_orcl.log from package 1
adrci>
——————————

all the above IPS commands generated only logical packages(i.e. no file got generated phsically).

10) To generate physical copy use below command.

adrci> ips generate package 1;
Generated package 1 in file C:\ORA227_20110626001721_COM_4.zip,
mode complete
adrci>

Advertisements
Categories: Oracle DBA
%d bloggers like this: