Starting with the Oracle 11g database product, a utility named “adrci” has been added to provide the ability to:

  • View alert logs
  • Purge trace files, alert logs, incidents
  • View traces files, alert logs
  • Bundle incidents for Oracle Support
  • etc.

This blog just shows some of the basics – see Oracle’s docs. for a comprehensive view of adrci capabilities

# get into adrci

adrci

# once into the adrci utility

show home

adrci> show home
ADR Homes:
diag/rdbms/vis/VIS

set home

adrci> set home diag/rdbms/vis/VIS

# all subsequent commands work on the “home” you set so, always “set home” first

# show an 11g and higher alert file – set your home first

show alert -tail 50

#Incidents are just specific occurrences of a problem.

show problem

show incident

adrci> show incident

ADR Home = /d01/oracle/VIS/12.1.0/admin/VIS_oel66-79/diag/rdbms/vis/VIS:
*************************************************************************
0 rows fetched

show incident -mode detail -p “incident_id=4399”

# Oracle automatically purge trace files and incidents based on short policies and long policies

# Short for tracefiles and long for incident problems

# show the policies with “show control” and set the policies with “set control”

show control

set control

# set control sets a purge period for a policy in hours – 360 below is 15 days

set control (SHORTP_POLICY = 360)

adrci> show control

ADR Home = /d01/oracle/VIS/12.1.0/admin/VIS_oel66-79/diag/rdbms/vis/VIS:
*************************************************************************
ADRID SHORTP_POLICY LONGP_POLICY LAST_MOD_TIME LAST_AUTOPRG_TIME LAST_MANUPRG_TIME ADRDIR_VERSION ADRSCHM_VERSION ADRSCHMV_SUMMARY ADRALERT_VERSION CREATE_TIME
——————– ——————– ——————– —————————————- —————————————- —————————————- ——————– ——————– ——————– ——————– —————————————-
1025832329 360 8760 2017-01-28 09:35:24.920971 -05:00 1 2 82 1 2017-01-28 09:35:24.920971 -05:00
1 rows fetched

# manually purging trace files

purge -age <minutes> -type ALERT|INCIDENT|TRACE|CDUMP|HM|UTSCDMP

adrci> purge -age 1440 -type trace

 

 

 

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *