ADRCI purge
The automated purge policy for Diagnostic data includes incident and problem descriptions, trace files, dumps, health monitor reports, alert log entries, and more are governed by policy setting.
Cleanup is done by MMON background process.
Cleanup is done by MMON background process.
The default policy can be seen from adrci, using show control
Log into the oracle user.
Set Oracle database environment, using
. oraenv
Start the ADR command line interpreter(ADRCI) by issuing the following command in the database directory:
adrci
ADRCI: Release 11.2.0.2.0
ADR base = "/ora01/oracle"
adrci> set home diag/rdbms/mzmd/mzmd
adrci> show control
ADR Home = /ora01/oracle/diag/rdbms/mzmd/mzmd:
*************************************************************************
ADRID SHORTP_POLICY LONGP_POLICY LAST_MOD_TIME LAST_AUTOPRG_TIME LAST_MANUPRG_TIME ADRDIR_VERSION ADRSCHM_VERSION ADRSCHMV_SUMMARY ADRALERT_VERSION CREATE_TIME
-------------------- -------------------- -------------------- ---------------------------------------- ---------------------------------------- ---------------------------------------- -------------------- -------------------- -------------------- -------------------- ----------------------------------------
1770745616 720 8760 2010-09-29 13:12:11.484502 -04:00 2010-10-01 16:35:55.896689 -04:00 1 2 80 1 2010-09-29 00:10:16.855531 -04:00
1 rows fetched
Default LONGP_POLICY is for metadata files, default is 1 year
SHORTP_POLICY is for incident files and dumps, default is 30 days
(note it is defined in Hours)
(note it is defined in Hours)
Change default policy
The default purge policy may be changed for a database, listener, ASM
adrci>set control (SHORTP_POLICY = 168) now set to 7 days
adrci>set control (LONGP_POLICY = 168 now set to 7 days
adrci>show control
Manual purge
The alert logs, dumps and trace may be purge manually, using purge command.
We can also manually purge information from the ADR using the ‘purge’ command from ADRCI (note this is defined in minutes and not hours!).
We can also manually purge information from the ADR using the ‘purge’ command from ADRCI (note this is defined in minutes and not hours!).
adrci> help purge
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.
Examples:
purge
purge -i 123 456
purge -age 60 -type incident
In this example we are purging all trace files older than 6 days
In this example we are purging all trace files older than 6 days
adrci> purge -age 8640 -type TRACE
Useful links