I have had a number of instances where the DB2DIAG.LOG, located under
“C:\Documents and Settings\All Users\Application Data\IBM\DB2\DB2COPY1\DB2”
would grow up to a 4GB file. When this happened, it usually caused our .NET DB2 database handler applications to begin throwing errors and hanging because DB2 was having write issues.
Simply trying to delete the log was problematic since many times it was in-use and typically required us to stop a lot of other programs…
A quick and easy way to roll the log and start fresh is to issue a “DB2DIAG –A” command from a DB2 Command Window.
As you can see above, my 12GB DB2DIAG.log file was rolled into a db2diag.log_2012-04-18-12.46.01 file.
Schedule this command to run weekly or whatever and you’re golden. The only other thing to keep in mind is you may want to schedule a delete script to remove any old rolled log files….
Hope this helps!