One of the features in Oralce I have been longing for is automatic dump and trace files housekeep. In Oracle 10g and before, DBA / System Admin have to write their own scripts and scheduled it to run periodically in order to remove those old dump and trace files.
In Oracle 11g, trace, dump and alert files in ADR are automatically purged by the MMON process. The retention period for the these files can be controlled via two  attributes -- LONGP_POLICY abd SHORTP_POLICY.

To view the current ADR retention policy, you can run the following command

ADRCI>show control
ADRID                SHORTP_POLICY        LONGP_POLICY         LAST_MOD_TIME                            LAST_AUTOPRG_TIME                        LAST_MANUPRG_TIME                        ADRDIR_VERSION       ADRSCHM_VERSION      ADRSCHMV_SUMMARY     ADRALERT_VERSION     CREATE_TIME
-------------------- -------------------- -------------------- ---------------------------------------- ---------------------------------------- ---------------------------------------- -------------------- -------------------- -------------------- -------------------- ----------------------------------------
248536116            720                  8760                 2010-09-21 18:17:08.915859 +08:00        2011-02-15 00:20:57.784615 +08:00                                                 1                    2                    65                   1                    2010-09-21 18:17:08.915859 +08:00
1 rows fetched

By default, LONGP_POLICY and SHORTP_POLICY are set to 8760 and 360 hours respectively.

To change the value of retention policy, use set control command

ADRCI> set control (SHORTP_POLICY = 240)

Note that files that are purged based on LONGP_POLICY includes the following:
-files in the alert directory
-files in the incident/incdir_ directory and metadata(in the directories metadata,ir,lck)  in the incident schema 
-files in the sweep directory
-files in the stage directory
-HM — files in the hm directory and metadata in the HM schema

And files that are purged based on SHORTP_POLICY are:
-files in the trace directory
-files in the cdump directory
-files in the trace/cdmp_ directories 
-files in the incpkg directory and metadata in the IPS schema

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Furl
  • Reddit
  • Spurl
  • StumbleUpon
  • Technorati