PURGE

Purpose

Purges diagnostic data in the current ADR home, according to current purging policies. Only ADR contents that are due to be purged are purged.

Diagnostic data in the ADR has a default lifecycle. For example, information about incidents and problems is subject to purging after one year, whereas the associated dump files (dumps) are subject to purging after only 30 days.

Some Oracle products, such as Oracle Database, automatically purge diagnostic data at the end of its life cycle. Other products and components require you to purge diagnostic data manually with this command. You can also use this command to purge data that is due to be automatically purged.

The SHOW CONTROL command displays the default purging policies for short-lived ADR contents and long-lived ADR contents.

Syntax and Description

purge [-i {id | start_id end_id} | 
  -age mins [-type {ALERT|INCIDENT|TRACE|CDUMP|HM|UTSCDMP}]]

Table 17-9 describes the flags for PURGE.


Table 17-9 Flags for the PURGE command

Flag Description

-i {id1 | start_id end_id}

Purges either a specific incident ID (id) or a range of incident IDs (start_id and end_id)

-age mins

Purges only data older than mins minutes.

-type {ALERT|INCIDENT|TRACE|CDUMP|HM|UTSCDMP}

Specifies the type of diagnostic data to purge. Used with the -age clause.

The following types can be specified:

  • ALERT - Alert logs

  • INCIDENT - Incident data

  • TRACE - Trace files (including dumps)

  • CDUMP - Core dump files

  • HM - Health Monitor run data and reports

  • UTSCDMP - Dumps of in-memory traces for each session

    The UTSCDMP data is stored in directories under the trace directory. Each of these directories is named cdmp_timestamp. In response to a critical error (such as an ORA-600 or ORA-7445 error), a background process creates such a directory and writes each session's in-memory tracing data into a trace file. This data might be useful in determining what the instance was doing in the seconds leading up to the failure.


Examples

This example purges all diagnostic data in the current ADR home based on the default purging policies:

purge

This example purges all diagnostic data for all incidents between 123 and 456:

purge -i 123 456

This example purges all incident data from before the last hour:

purge -age 60 -type incident

Note:

PURGE does not work when multiple ADR homes are set. For information about setting a single ADR home, see "Setting the ADRCI Homepath Before Using ADRCI Commands".