Oracle 11g ADRCI - Configure and Setup Automatic Diagnostic Repository Using Command Line Interpreter

advertisements

_____________________________________________________________________________________________________________________

The Eucharistic Miracles of the World
ADRCI is the command-line tool to monitor the Automatic Diagnostic Repository in Oracle 11g. These are the features of the ADRCI.
  • You can view the diagnostic data within the Automatic Diagnostic Repository (ADR).
  • It is used to view the Health Monitor reports.
  • This is the tool to create a package of incident and problem information into a zip format for detailed diagnose by the Oracle Support.   
  • ADRCI has a set of commands can be used in interactive mode or within the scripts.
  • ADRCI can execute scripts of ADRCI commands in the same way that SQL*Plus executes scripts of SQL and PL/SQL commands.
  • ADR data is secured by operating system permissions on the ADR directories, hence there is no need to log in to ADRCI.

How to start ADRCI interactive mode?

Set ORACLE_HOME and PATH environment variables properly. PATH environment variable must include ORACLE_HOME/bin
Fire the adrci command in the operating system prompt.
$adrci
adrci>
To exit from the adrci prompt type exit or quit.

See some example commands below


$ adrci

ADRCI: Release 11.1.0.7.0 - Production on Tue Aug 2 23:40:36 2011

Copyright (c) 1982, 2007, Oracle.  All rights reserved.

ADR base = "/data/oracle/admin/prod9"
adrci> show HOME
ADR Homes:
diag/rdbms/prod9/prod9
adrci> show homepath
ADR Homes:
diag/rdbms/prod9/prod9

View Help – List of commands

adrci> help

 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

View List of Problems

adrci> show problem

ADR Home = /data/oracle/admin/prod9/diag/rdbms/prod9/prod9:
*************************************************************************
PROBLEM_ID           PROBLEM_KEY                                                 LAST_INCIDENT        LASTINC_TIME
-------------------- ----------------------------------------------------------- -------------------- ----------------------------------------
3                    ORA 600 [kzsviver:4]                                        96273                2011-07-26 01:19:13.656023 -07:00
1                    ORA 600 [kpotcgah-7]                                        76993                2011-07-15 21:24:45.168636 -07:00
2                    ORA 600                                                     38416                2011-07-15 10:21:34.214202 -07:00
3 rows fetched

View List of Incidents

adrci> show incident

ADR Home = /data/oracle/admin/prod9/diag/rdbms/prod9/prod9:
*************************************************************************
INCIDENT_ID          PROBLEM_KEY                                                 CREATE_TIME
-------------------- ----------------------------------------------------------- ----------------------------------------
96273                ORA 600 [kzsviver:4]                                        2011-07-26 01:19:13.656023 -07:00
76993                ORA 600 [kpotcgah-7]                                        2011-07-15 21:24:45.168636 -07:00
67393                ORA 600 [kpotcgah-7]                                        2011-07-15 21:23:21.558570 -07:00
38593                ORA 600 [kpotcgah-7]                                        2011-07-15 21:14:39.926067 -07:00
29012                ORA 600                                                     2011-07-15 10:12:40.718673 -07:00
29011                ORA 600 [kpotcgah-7]                                        2011-07-15 10:12:31.447684 -07:00
29010                ORA 600                                                     2011-07-15 10:12:19.482870 -07:00
29009                ORA 600 [kpotcgah-7]                                        2011-07-15 10:11:06.247114 -07:00
28976                ORA 600                                                     2011-07-15 10:17:33.285385 -07:00
28974                ORA 600                                                     2011-07-15 10:16:33.013877 -07:00
28972                ORA 600                                                     2011-07-15 10:15:41.681809 -07:00
28971                ORA 600 [kpotcgah-7]                                        2011-07-15 10:15:32.137271 -07:00
28970                ORA 600 [kpotcgah-7]                                        2011-07-15 10:15:05.756256 -07:00
28969                ORA 600 [kpotcgah-7]                                        2011-07-15 10:11:05.401734 -07:00
14 rows fetched

View List of Trace files

adrci> show tracefile
     diag/rdbms/prod9/prod9/trace/alert_prod9.log
     diag/rdbms/prod9/prod9/trace/prod9_m000_29985.trc
     diag/rdbms/prod9/prod9/trace/prod9_m000_26306.trc
     diag/rdbms/prod9/prod9/trace/prod9_m000_28453.trc
     diag/rdbms/prod9/prod9/trace/prod9_m000_28675.trc
     diag/rdbms/prod9/prod9/trace/prod9_m000_156.trc
     diag/rdbms/prod9/prod9/trace/prod9_m000_359.trc
     diag/rdbms/prod9/prod9/trace/prod9_m000_521.trc

How to run ADRCI commands from OS prompt?

$ adrci EXEC="SHOW HOMES; SHOW INCIDENT"
ADR Homes:
diag/rdbms/prod9/prod9

ADR Home = /data/oracle/admin/prod9/diag/rdbms/prod9/prod9:
*************************************************************************
INCIDENT_ID          PROBLEM_KEY                                                 CREATE_TIME
-------------------- ----------------------------------------------------------- ----------------------------------------
96273                ORA 600 [kzsviver:4]                                        2011-07-26 01:19:13.656023 -07:00
76993                ORA 600 [kpotcgah-7]                                        2011-07-15 21:24:45.168636 -07:00
67393                ORA 600 [kpotcgah-7]                                        2011-07-15 21:23:21.558570 -07:00
38593                ORA 600 [kpotcgah-7]                                        2011-07-15 21:14:39.926067 -07:00
29012                ORA 600                                                     2011-07-15 10:12:40.718673 -07:00
29011                ORA 600 [kpotcgah-7]                                        2011-07-15 10:12:31.447684 -07:00
29010                ORA 600                                                     2011-07-15 10:12:19.482870 -07:00
29009                ORA 600 [kpotcgah-7]                                        2011-07-15 10:11:06.247114 -07:00
28976                ORA 600                                                     2011-07-15 10:17:33.285385 -07:00
28974                ORA 600                                                     2011-07-15 10:16:33.013877 -07:00
28972                ORA 600                                                     2011-07-15 10:15:41.681809 -07:00
28971                ORA 600 [kpotcgah-7]                                        2011-07-15 10:15:32.137271 -07:00
28970                ORA 600 [kpotcgah-7]                                        2011-07-15 10:15:05.756256 -07:00
28969                ORA 600 [kpotcgah-7]                                        2011-07-15 10:11:05.401734 -07:00
14 rows fetched

How to get alert log details in ADRCI?

adrci> show alert -TAIL 10
2011-08-03 00:28:45.688000 -07:00
  Time: 03-AUG-2011 00:28:45
  Tracing not turned on.
  Tns error struct:
    ns main err code: 12547

TNS-12547: TNS:lost contact
    ns secondary err code: 12560
    nt main err code: 0
    nt secondary err code: 0
    nt OS err code: 0
ORA-609 : opiodr aborting process unknown ospid (4522_1)
2011-08-03 00:37:50.490000 -07:00
Incremental checkpoint up to RBA [0x49.96b6a.0], current log tail at RBA [0x49.96e3f.0]
2011-08-03 01:07:56.490000 -07:00
Incremental checkpoint up to RBA [0x49.9859b.0], current log tail at RBA [0x49.986d3.0]
2011-08-03 01:38:02.480000 -07:00

How to find some specific trace file in ADRCI?

adrci> SHOW TRACEFILE %mmon%

_____________________________________________________________________________________________________________________

Website Stats

0 comments:

Post a Comment

Labels

Oracle (629) Script (86) General (77) Unix (47) Blog (23) Technology (19) gadget (6) games (6) Business (3) OCI (3) SQL* Loader (3) Datapump (2)
 

acehints.com Copyright 2011-23 All Rights Reserved | Site Map | Contact | Disclaimer