Change the ADR retention

The default retention for SHORTP_POLICY is 720 ( HOURS ) /30 days, LONGP_POLICY is 8760 ( HOURS ) or 1 year.  The details are described 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:

  • Trace files
  • Core dump files
  • Packaging information
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:

  • Incident information
  • Incident dumps
  • Alert logs

The below example shows 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
Advertisements
This entry was posted in ADR and tagged , , , , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s