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
I don't expect to see any automatic clean-out but that is just my
impression not based on anything I've been told.
What may or may not be important, unlike with backups, is not as
clear cut when it comes to trace files.
What I'd like to see is an easy way to do backup controlfile to
trace and not have the file named like every other trace file (I
mean the text version not just the binary). That would be a
decent enhancement.
--
Daniel A. Morgan
Oracle Ace Director & Instructor
University of Washington
damo...@x.washington.edu (replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
> What I'd like to see is an easy way to do backup controlfile to
> trace and not have the file named like every other trace file (I
> mean the text version not just the binary). That would be a
> decent enhancement.
You mean something like this?
SQL>
SQL> alter database backup controlfile to trace as '/tmp/dan.sql';
Database altered.
MAX_DUMP_FILE_SIZE?
Does everything in bdump etc. automatically, except the alert log (in
10g at any rate).
I also have a stored proc for trimming the audit trail, and a shell
script for the listener logs/alert log/rman log - but I don't do it by
age, just tail to the last 20,000 (or whatever) lines. If any of this is
of any use, please let me know.
Palooka
That makes a binary copy not a text copy. Please note that I
addressed that above.
That produces either ORA-00933 (on 9.0.1 and below) or textfile (from
9.2 onwards).
Best regards
Maxim
The new adrci command line tool could do this, look at the purge
command:
$ adrci
ADRCI: Release 11.1.0.7.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.
Options:
[-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.
Examples:
purge
purge -i 123 456
purge -age 60 -type incident
adrci>
snip
> > 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.
>
Now that is what I was thinking about and looking for!
Thank you very much ... I will check it out and report back results
here.
Maybe we will get some kind of integration eventually so that we get
something that can also trim various log files ( alert, listener, em
etc ) automatically along with un-needed trace files, incidents,
whatever.
Thanks John
snip
> >> You mean something like this?
> >> SQL> SQL> alter database backup controlfile to trace as '/tmp/dan.sql';
>
> >> Database altered.
>
> > That makes a binary copy not a text copy. Please note that I
> > addressed that above.
>
> That produces either ORA-00933 (on 9.0.1 and below) or textfile (from
> 9.2 onwards).
>
No clue why Captain Morgan hasn't tried that command and is unaware of
how it works apparently.
snip
> The new adrci command line tool could do this, look at the purge
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 ...
#!/bin/ksh
. /home/oracle/ora_11g_env
adrci << EOF
set home diag/rdbms/test11g/test11g
purge -age 4320 -type trace
exit
EOF
>> SQL> alter database backup controlfile to trace as '/tmp/dan.sql';
>>
>> Database altered.
>
> That makes a binary copy not a text copy. Please note that I addressed
> that above.
No, it doesn't make a binary copy. It produces a trace file and renames
it as requested.
Indeed. It would appear that there's a clue in the statement itself:
alter database backup controlfile TO TRACE as '/tmp/dan.sql';
-g