Monday, June 22, 2015

ADRCI User's Guide

Automatic Log Purging via ADRCI In ADR there are two policies SHORTP_POLICY and LONGP_POLICY.

These policies cover the following:
  ALERT — files in the ./alert directory
  INCIDENT — files in the ./incident/incdir_ directory and metadata
  CDUMP — files in the ./cdump directory
  UTSCDMP — files in the ./trace/cdmp_ directories STAGE — files in the ./stage directory
  SWEEP — files in the ./sweep directory
  HM — files in the ./hm directory and metadata in the HM schema
  IPS — files in the ./incpkg directory and metadata in the IPS schema

LONGP_POLICY covers the information that have a long life span. Default for this policy is 365 days (or 8760 hours).

This policy is used by :
  ALERT
  INCIDENT
  SWEEP
  STAGE
  HM

SHORTP_POLICY  is used to purge the information that have short life. Default value is 30 days.

This policy is used by :
  TRACE
  CDUMP
  UTSCDMP
  IPS

oracle@jhennning14u:jrhdb1:/u01 $ adrci
ADRCI: Release 11.2.0.3.0 - Production on Wed Nov 20 10:13:21 2013
Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
ADR base = "/u01/app/oracle"
adrci> show homes
OR
adrci> show homes -all --if a home is already set
ADR Homes:
diag/asm/+asm/+ASM1
diag/rdbms/jrhdb/jrhdb1
diag/rdbms/bahdb/bahdb1
diag/rdbms/bahdbr/bahdbr1
diag/tnslsnr/jhennning14u/listener
adrci>
adrci> set homepath diag/rdbms/bahdbr/bahdbr1
adrci>
adrci> show homes
ADR Homes:
diag/rdbms/bahdbr/bahdbr1
adrci>
adrci> show alert -tail 50
ARCH: Error 19504 Creating archive log file to '+FLASHBACK'
ORA-00312: online log 1 thread 1: '+DATA/bahdbr/onlinelog/group_1.286.750303647'
ORA-00312: online log 1 thread 1: '+FLASHBACK/bahdbr/onlinelog/group_1.275.750303647'
adrci>
adrci> show alert -p "MESSAGE_TEXT LIKE '%ORA-%'"
adrci>
adrci> show TRACEFILE -RT
adrci> show INCIDENT
adrci> SHOW INCIDENT -MODE BRIEF
adrci> SHOW INCIDENT -MODE DETAIL -P "INCIDENT_ID=320149"
adrci> SHOW CONTROL
adrci> set control (SHORTP_POLICY =360)
adrci> set control (LONGP_POLICY =360)
adrci> purge -age 360 -type TRACE
adrci> purge
--############# END USING ADRCI #############

No comments:

Post a Comment