Hi Brian,
We use cron to do this but it only works if you are on unix...
# Roll over and compress the diag file at midnight on 1st and 15 of the
month
1 0 1,15 * * cd $HOME/sqllib/db2dump;mv db2diag.log db2diag.log.old;rm
db2diag.log.old.Z;compress db2diag.log.old
This will keep the previous 1/2 month's entries in a compressed form. It
runs from the instance owner's crontab.
Cheers
Gerry
|---------+------------------------------------------------------->
| | "Delhumeau Raul " |
| | <db2udbdba-ezmlmshield-x802031.[Email Address Removed] | azyDBA.com> |
| | |
| | 31/03/2005 05:21 |
| | |
|---------+------------------------------------------------------->
>----------------------------------------------------------------------------------------------|
| |
| To: "LazyDBA Discussion" <[Email address protected] |
| cc: |
| Subject: RE: Pruning db2diag.log |
>----------------------------------------------------------------------------------------------|
Hi Brian
The easiest way is to write & schedule a job / batch processes that
simply truncates the db2diag.log every so often. Some sites truncate the
file every 24 hours or every week / month. If the file is deleted, DB2
will automatically recreate it as needed from scratch...and it will
start growing again.
You can search for a specific date in the file and delete everything
before that point (and move to another filesystem or tape).
Hope this helps!
Good luck!
Raul Delhumeau
-----Original Message-----
From: Brian Sandmann
[mailto:db2udbdba-ezmlmshield-x14875890.[Email address protected]
Sent: Wednesday, March 30, 2005 12:11 PM
To: LazyDBA Discussion
Subject: Pruning db2diag.log
Over time the db2diag.log/log gets extremely large. What is the easiest
way to manage the size log the log? After entries are 3 or 4 months, we
really don't need the entries. Is there a job or parameter that were
delete entries in the log after they are X days old?
---------------------------------------------------------------------
PLEASE CLICK REPLY-ALL TO SEND A REPLY TO EVERYONE
website: http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
---------------------------------------------------------------------
PLEASE CLICK REPLY-ALL TO SEND A REPLY TO EVERYONE
website: http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
DB2 & UDB email list listserv db2-l LazyDBA home page