ADRCI: Release 11.1.0.7.0 - Production on Mon Apr 27 16:58:37 2009 Copyright (c) 1982, 2007, Oracle. All rights reserved. ADR base = "c:\oracle"

adrci> help | help extended

© 2010 Oracle Corporation 296

adrci> set home diag\rdbms\source\source

Step 2: Define the editor, e.g.:

adrci> set editor uedit32

Step 3: Check alert.log, problems and incidents

adrci> show alert -tail 50 -f
adrci> show problem
adrci> show incident

adrci: Trace file housekeeping /* Check the current settings for retention policies */

adrci> show control

/* Change the retention policies */

adrci> set control (SHORTP_POLICY = 96)
adrci> set control (LONGP_POLICY = 240)
adrci> help purge

© 2010 Oracle Corporation 298

Usage: PURGE [[-i | ] |[-age [-type ALERT|INCIDENT|TRACE|CDUMP|HM|UTSCDMP]]]:

Purpose: Purge the diagnostic data in the current ADR home. If no option is specified, the default purging policy will be used. Options:


ADR Command Interpreter (ADRCI)

It has multiple features such as analyze diagnostic data within the Automatic Diagnostic Repository (ADR). create a package with incident / problem information for Oracle Support run the Health Checks and many other features.

Set your environment and run the ADRCI utility:

$ adrci

Use the following command to list the ADR homes:

adrci> show homes

ADR Homes:
diag/rdbms/mytestdb/MYTESTDB1
diag/rdbms/mytestdb/MYTESTDB

Choose the ADR home from the list above:

adrci> set homepath diag/rdbms/mytestdb/MYTESTDB1

Check the current retention policy:

adrci> show control

Check the following columns in the output:

LONGP_POLICY (long term) is set to 365 days by default. It is responsible for Incidents and Health Monitor warnings.

SHORTP_POLICY (short term) is set to 30 days by default. It manages the trace and core dump files.
Use the following commands to change the retention policy (optional).
* Specify the time in hours ( 240 = 10 days , 1095 = 1 .5 Months )

adrci> set control (SHORTP_POLICY = 240)
adrci> set control (LONGP_POLICY = 1095)

Now you have the following alternatives to purge the old logs/traces:

1) Purge the old files manually ( specify the retention period explicitly )

* Specify the time in minutes ( 10080/60/24=7 Days )

** It is possible to purge different diagnostic files separately

adrci> purge -age 10080 -type ALERT
adrci> purge -age 10080 -type TRACE
adrci> purge -age 10080 -type incident
adrci> purge -age 10080 -type hm
adrci> purge -age 10080 -type utscdmp
adrci> purge -age 10080 -type cdump

** Also you may want to purge all files at once

adrci> purge -age 10080

2) Use autopurge option ( in this case the current retention policy is applied )

adrci> purge
adrci>SHOW ALERT -P "MESSAGE_TEXT LIKE '%ORA-00060%'"; search for alert lines that have ORA- in them.

adrci>SHOW ALERT -P "MESSAGE_TEXT LIKE '%ORA-%'"

Create IPS Package

ips pack [incident incident_id|problem problem_id|problemkey prob_key|seconds secs|time start_time to end_time] [correlate {basic|typical|all}] [in path]

For example:

adrci> ips pack incident 5137 in c:\tmp
Generated package 5 in file C:\tmp\ORA600qmx_20071116175948_COM_1.zip, mode complete
adrci>

To create the logical incident package, use a variation of the ?ips create package? command:

ips create package {incident incident_id|problem problem_id|problemkey problem_key|seconds secs|time
start_time to end_time} [correlate basic|typical|all]

It is possible to create a logical package based on incident number such as:

adrci> ips create package incident 5138
Created package 1 based on incident id 5138, correlation level typical
adrci>

To create an incident package based on a problem, it is necessary to find the problem_id by using the 'show incident? command:

show incident [-p predicate_string] [-mode {BASIC|BRIEF|DETAIL}]

For example:

adrci> show incident -mode brief -p "incident_id=5137" ADR Home = c:\oracle\11g\diag\rdbms\ora11gr1\ora11gr1: ********************************************************** INCIDENT INFO RECORD 1 ********************************************************** INCIDENT_ID 5137 STATUS ready CREATE_TIME 2015-11-15 22:53:40.859000 -08:00 PROBLEM_ID 1 CLOSE_TIME FLOOD_CONTROLLED none ERROR_FACILITY ORA ERROR_NUMBER 600 ERROR_ARG1 qmxarElemAt2 ERROR_ARG2 144 ERROR_ARG3 ERROR_ARG4 ERROR_ARG5 ERROR_ARG6 ERROR_ARG7 ERROR_ARG8 SIGNALLING_COMPONENT SIGNALLING_SUBCOMPONENT SUSPECT_COMPONENT SUSPECT_SUBCOMPONENT ECID IMPACTS 0 1 rows fetched
HOME