Oracle Automatic Diagnostic Repository (ADR) and ADRCI (ADR Command Interpreter) Version 19.3 |
---|
General Information | ||
Library Note |
|
|
Purpose | The ADR and ADRCI form an essential component of the database and its ability to trace issues, report them to Oracle Support, and manage complex environments. If you are not proficient with ADR and ADRCI you are as much a "Senior" DBA as you would be if you couldn't deploy RAC and Data Guard. |
|
Product/Component Type Subdirectories Under ADR Base | ![]() |
|
ADR Directory Structure |
![]() |
|
Client Structure (OEL) | /home/oracle/oradiag_oracle/diag/clients/user_oracle/host_2309071977_76/ [oracle@perrito4 host_2309071977_76]$ ls alert cdump incident incpkg lck metadata stage sweep trace Note: "When client side OCI or NET have an incident, an ADR directory is created in the user's home and the incident and its associated dump files are located within. The root is named oradiag_<username>. So, finding this directory structure indicates some failure on the client side. The reason the ADR is created in the user's home directory and not in the Client Oracle home: permissions. I was puzzled that my db server host had this directory even though I never installed the Client there. Dev explained that "Every DB interaction uses OCI (SQLPLUS, for exampl) is 'from a client side'." Thus, you use it during an install, for example, and often without knowing it. |
|
Queries | show parameter diagnostic_dest |
|
Change the ADR Repository Location | -- database |
|
ADRCI Comands | ||
Purpose | The ADR Command Interpreter (ADRCI) is a command-line tool that you use to manage Oracle Database diagnostic data.
ADRCI is a command-line tool that is part of the fault diagnosability infrastructure introduced in Oracle Database Release 11g. ADRCI enables:
ADRCI has a rich command set, and can be used in interactive mode or within scripts. In addition, 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. |
|
CREATE REPORT | create report <report_type> <report_id> |
|
col check_name format a30 |
||
ECHO | echo [quoted_string] |
|
adrci> echo on |
||
ESTIMATE Provide an estimate for age or size of the ADR home |
estimate (<purge_policy_name>=<value>, ...) |
|
adrci> estimate (SHORTP_POLICY = 720) |
||
EXIT | exit |
|
$ adrci |
||
HELP | help [<topic_name>] |
|
adrci> help |
||
HOST | host |
|
$C:\u01\orahome\db_home1\bin>adrci |
||
IPS ADD Adds an incident to an existing package |
incident <incid> | PROBLEM <prob_id> | PROBLEMKEY <prob_key> | |
|
adrci> ips add incident 22 package 12 |
||
IPS ADD FILE Adds a file to an existing package |
ips add file <file_spec> PACKAGE <pkgid> |
|
TBD | ||
IPS ADD NEW INCIDENTS Find new incidents for the problems in the specified package, and adds the latest ones to the package |
ips add new incidents PACKAGE <package_id> |
|
adrci> ips add new incidents package 12 |
||
IPS CHECK REMOTE KEYS Checks for incidents matching the keys in the specified file |
ips check remote keys FILE <file_spec> |
|
TBD | ||
IPS COPY IN FILE Copies an external file into the ADR, and associate it with a package and (optionally) an incident. |
ips copy in file <file> [TO <new_name>] [OVERWRITE] PACKAGE <pkgid> [INCIDENT <incid>] |
|
TBD | ||
IPS COPY OUT FILE Copies an ADR file to a location outside the ADR |
ips copy out file <source> TO <target> [OVERWRITE] |
|
TBD | ||
IPS CREATE PACKAGE INCIDENT | ips create package incident <incident_number> [CORRELATE <BASIC | TYPICAL | ALL>] |
|
adrci> ips create package incident 22 |
||
IPS CREATE PACKAGE PROBLEM | ips create package problem <problem_id> |
|
adrci> ips create package problem ? |
||
IPS CREATE PACKAGE PROBLEMKEY | ips create package problemkey <'problem_key'>
[CORRELATE <BASIC | TYPICAL | ALL>] |
|
adrci> ips create package problemkey '?' |
||
IPS CREATE PACKAGE SECONDS | ips create package seconds <sec> [CORRELATE <BASIC | TYPICAL | ALL>] |
|
adrci> ips create package seconds 600 CORRELATE ALL |
||
IPS CREATE PACKAGE TIME | ips create package time <'start_timestamp'> TO <'end_timestamp'> |
|
adrci> ips create package time '2020-11-04 00:00:00 -06:00' to '2020-11-11 23.59.59 -06:00' |
||
IPS DELETE PACKAGE Drops a package and its contents |
ips delete package <package_id> |
|
adrci> ips delete package time 22 |
||
IPS FINALIZE PACKAGE Prepare a package for shipping by including correlated content |
ips finalize package <package_id> [CALLOUTS (OPATCH, CRS, OCM, OSS, RDA)] |
|
adrci> ips finalize package 12 callouts (OPATCH, CRS) |
||
IPS GENERATE PACKAGE | ips generate package <package_id> [IN <path>][<COMPLETE | INCREMENTAL>] |
|
adrci> ips generate package
12 INCREMENTAL |
||
IPS GET MANIFEST Extracts and displays a package's manifest |
ips get manifest FROM FILE <file_path_and_name> |
|
adrci> ips get manifest from file /tmp/IPSPKG_200704130121_COM_1.zip |
||
IPS GET METADATA Extracts and displays a package's metadata XML document |
ips get metadata [FROM FILE <file_path_and_name> | FROM ADR] |
|
adrci> ips get metadata from file /tmp/IPSPKG_200704130121_COM_1.zip |
||
IPS GET REMOTE KEYS Create a file with keys matching incidents in specified package |
ips get remote keys FILE <file_spec> PACKAGE <package_id> |
|
adrci> ips get remote keys file /tmp/key_file.txt package 12 |
||
IPS PACK Create a package, and immediately generate the physical package |
ips pack |
|
ips pack incident 861; |
||
IPS REMOVE | ips remove [INCIDENT <incid> | PROBLEM <prob_id> | PROBLEMKEY <prob_key> ] |
|
adrci> ips remove incident 22 package 12 |
||
IPS REMOVE FILE | ips remove file <file_spec> PACKAGE <pkgid> |
|
TBD | ||
IPS SET CONFIGURATION | IPS SET CONFIGURATION <parameter_id> <value> |
|
ips set configuration 6 2 |
||
IPS SHOW | ips show incidents package pkg_id |
|
adrci> show homes |
||
IPS SHOW CONFIGURATION | ips show configuration |
|
adrci> show homes |
||
IPS SHOW FILES | ips show files PACKAGE <package_id> |
|
adrci> ips show files package 12 |
||
IPS SHOW INCIDENTS | ips show incidents PACKAGE <package_id> |
|
adrci> ips show incidents package 12 |
||
IPS SHOW PACKAGE | ips show package <package_id> [BASIC | BRIEF | DETAIL] |
|
adrci> ips show package |
||
IPS UNPACK | ips unpack file file_name [into path] |
|
adrci> ips unpack file /home/oracle/ORA603_20180206165316_COM_1.zip into /tmp/newadr |
||
IPS UNPACK FILE Unpackages a physical file into the specified path automatically creating an ADR_HOME |
ips unpack file <file_spec> [INTO <path>] |
|
ips unpack file /tmp/IPSPKG_20061026010203_COM_1.zip into /tmp/newadr |
||
IPS UNPACK PACKAGE | ips unpack package <pkg_name> [INTO <path>] |
|
adrci> ips unpack package IPSPKG_20061026010203 into /tmp/newadr |
||
IPS USE REMOTE KEYS | ips use remote keys FILE <file_spec> PACKAGE <package_id> |
|
adrci> ips use remote keys file /tmp/key_file.txt package 12 |
||
PURGE | purge [[-i {id1 | start_id end_id}] [-age mins] [-type {ALERT | INCIDENT | TRACE | CDUMP | HM}] |
|
adrci> purge -i 1238673908 1440 |
||
QUIT | quit |
|
$ adrrci |
||
RUN | run script_name |
|
adrci> run uwadrscript |
||
SET BASE | set base <base_path> |
|
adrci> set base /apps/oracle/product |
||
SET BROWSER | set browser browser_program |
|
adrci> set browser firefox |
||
SET CONTROL | set control (<SHORTP_POLICY | LONGP_POLICY> = value, ...) |
|
adrci> set control (SHORTP_POLICY = 360) |
||
SET ECHO | set echo <ON | OFF> |
|
adrci> set echo off |
||
SET EDITOR | set editor editor_program |
|
adrci> set editor vi |
||
SET HOME | set home <home_location> |
|
adrci> show homes |
||
SET HOMES | set homes <home_location1>, <home_location2>, <...> |
|
adrci> show homes |
||
SET HOMEPATH | set homepath homepath_str1 [homepath_str2] [...] |
|
adrci> show homepath |
||
SET TERMOUT | termout <ON | OFF> |
|
adrci> set termout on |
||
SHOW ALERT | show alert [-p predicate_string] [-tail [num] [-f]] [-term] [-file alert_file_name] |
|
$ adrci exec="show homes; show incident" |
||
Tail the Alert Log | -- open a terminal window |
|
Show only lines with specific text | -- open a terminal window |
|
SHOW BASE | show base |
|
adrci> show base |
||
SHOW CONTROL | show control |
|
adrci> set homepath diag\rdbms\orabase\orabase |
||
SHOW HM_RUN | show hm_run [-p predicate_string] |
|
adrci> show hm_run |
||
SHOW HOME | show home |
|
adrci> show home |
||
SHOW HOMES | show homes |
|
adrci> show homes |
||
SHOW HOMEPATH | show homepath |
|
adrci> show homepath |
||
SHOW INCDIR | show incdir [id | id_low id_high] |
|
adrci> show incdir |
||
SHOW INCIDENT | show incident -p predicate_string [-mode {BASIC|BRIEF|DETAIL}] |
|
adrci> show incident |
||
SHOW LOG | show log [-l log_name] [-tail [number_of_lines] [-f (follow)] [-term] |
|
adrci> show log |
||
SHOW PROBLEM | show problem [-p predicate_string] [-last num | -all] |
|
adrci> show problem |
||
SHOW REPORT | show report report_type run_name |
|
-- need to define a single home |
||
SET TRACEFILE | show tracefile [file1 file2 ...] [-rt | -t] [-i inc1 inc2 ...] |
|
adrci> show tracefile %mmon% -rt |
||
SPOOL | SPOOL filename [[APPEND] | [OFF]] |
|
adrci> spool /home/oracle/adr.log |
||
ADR Metadata Folder | ||
The ADR Metadata folder contains, right now, 44 files that are external tables queryable via adrci using SQL: External tables that are not visible in CDB_OBJECTS_AE. Start by making a list of the current metadata file names and then try these examples using your file names if they differ from mine. | ||
Incidents Query | adrci> show homes |
|
Demo | ||
ADRCI Demo | SQL> conn / as sysdba |
Related Topics |
Built-in Functions |
Built-in Packages |
DBMS_ADR |
DBMS_HM |
DBMS_IR |
DBMS_SQLDIAG |
ORADEBUG |
RMAN |
What's New In 21c |
What's New In 23c |
This site is maintained by Dan Morgan. Last Updated: | This site is protected by copyright and trademark laws under U.S. and International law. © 1998-2023 Daniel A. Morgan All Rights Reserved | |||||||||
|
||||||||||