The default retention for SHORTP_POLICY is 720 ( HOURS ) /30 days, LONGP_POLICY is 8760 ( HOURS ) or 1 year. The details are described as below:
Attribute Name | Description |
---|---|
SHORTP_POLICY | Number of hours after which to purge ADR contents that have a short life. Default is 720 (30 days).A setting of 0 (zero) means that all contents that have a short life can be purged. The maximum setting is 35791394. If a value greater than 35791394 is specified, then this attribute is set to 0 (zero).
The ADR contents that have a short life include the following:
|
LONGP_POLICY | Number of hours after which to purge ADR contents that have a long life. Default is 8760 (365 days).A setting of 0 (zero) means that all contents that have a long life can be purged. The maximum setting is 35791394. If a value greater than 35791394 is specified, then this attribute is set to 0 (zero).
The ADR contents that have a long life include the following:
|
The following example illustrates how to change retention policies to 1 week ( 168 hours ) and 2 weeks ( 336 hours ) respectively:
oracle@racnode1:/u01/app/oracle/diag/rdbms/ractest/RACTEST1/trace$ adrci ADRCI: Release 12.1.0.2.0 - Production on Mon May 22 10:43:49 2017 Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved. ADR base = "/u01/app/oracle" adrci> show home ADR Homes: diag/rdbms/eactest/RACTEST1 adrci> select SHORTP_POLICY,LONGP_POLICY from ADR_CONTROL; ADR Home = /u01/app/oracle/diag/rdbms/ractest/RACTEST1: *************************************************************************exit SHORTP_POLICY LONGP_POLICY -------------------- -------------------- 720 8760 1 rows fetched adrci> set control (SHORTP_POLICY=168); adrci> select SHORTP_POLICY,LONGP_POLICY from ADR_CONTROL; ADR Home = /u01/app/oracle/diag/rdbms/ractest/RACTEST1: ************************************************************************* SHORTP_POLICY LONGP_POLICY -------------------- -------------------- 168 8760 1 rows fetched adrci> set control (LONGP_POLICY=336 ); adrci> select SHORTP_POLICY,LONGP_POLICY from ADR_CONTROL; ADR Home = /u01/app/oracle/diag/rdbms/ractest/RACTEST1: ************************************************************************* SHORTP_POLICY LONGP_POLICY -------------------- -------------------- 168 336 1 rows fetched adrci> purge; adrci>
To purge incident files older than 6 days ( 8640 MINUTES ) , you will need to prefer the following commands:
adrci> purge -age 8640 -type INCIDENT