Re: anyone have a decent purge script for 11g diag directories
Date: Sat, 15 Nov 2008 07:12:28 -0800 (PST)
On Nov 15, 5:15 am, "jan.benjam..._at_gmail.com" <jan.benjam..._at_gmail.com> wrote:
> The new adrci command line tool could do this, look at the purge
> $ adrci
> ADRCI: Release 184.108.40.206.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|
> Purpose: Purge the diagnostic data in the current ADR home. If no
> option is specified, the default purging policy will be
> [-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
> 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
Yes thank you this seems to work well and was what I was looking for ... ( will come up with something that looks at the various adr homes and drives a purge based on parameters of how many days old alert files to ditch ).
Looks like it cleans out the .trc and .trm files together of course ...
adrci << EOF
set home diag/rdbms/test11g/test11g
purge -age 4320 -type trace
EOF Received on Sat Nov 15 2008 - 09:12:28 CST