Re: anyone have a decent purge script for 11g diag directories
Date: Sat, 15 Nov 2008 02:15:54 -0800 (PST)
On Nov 14, 1:37 am, hpuxrac <johnbhur..._at_sbcglobal.net> wrote:
> Not only do we have the standard .trc files there are now .trm files
> and probably various other things.
> Maybe I am missing some basic concept like some parameter to set or
> utility to use so that 11g databases will clean out and delete stuff
> after a certain date in the diag structure.
> Or perhaps oracle has that on their to-do list but hasn't gotten
> around to that yet.
> The idea of collecting and keeping all the diagnostic stuff around
> together is fine if only there is some method behind the madness of
> getting rid of stuff that you don't want anymore.
> Ideas or clarification or working 11g linux scripts would be
> appreciated! Even some words of warning about things not to get rid
> of are fine.
> Thanks John
The new adrci command line tool could do this, look at the purge command:
ADRCI: Release 126.96.36.199.0 - Production on Sat Nov 15 11:16:48 2008
Copyright (c) 1982, 2007, Oracle. All rights reserved.
ADR base = "/app/oracle"
adrci> help purge
Usage: PURGE [[-i <id1> | <id1> <id2>] |
[-age <mins> [-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.
[-i id1 | id1 id2]: Users can input a single incident ID, or a range of incidents to purge.
[-age <mins>]: Users can specify the purging policy either to all the diagnostic data or the specified type. The data older than <mins>
ago will be purged
[-type ALERT|INCIDENT|TRACE|CDUMP|HM|UTSCDMP]: Users can specify what type of
data to be purged.
purge -i 123 456
purge -age 60 -type incident
adrci> Received on Sat Nov 15 2008 - 04:15:54 CST