View Single Post

   
  #2 (permalink)  
Old 02-27-2008, 08:34 AM
Jeroen van den Broek
 
Posts: n/a
Default Re: clean up old log files


adrian.alek@gmail.com wrote:
> I have a question about DB2 ver 7.2
>
> We are run out space and Network guys like to delete the old log files
> of db2
> Last week we had a problem in developer because they deleted the old
> log files and DB2 was try to used it
>
> My question is what is the best way for clean up old log files
>
> thanks in advance
>


Assuming this is DB2 for LUW:

1. First find out what is the oldest log that is still active:
a. db2 connect to <your db-id>
b. db2 get db cfg for <your db-id>
Search for 'First active log file'.
This should give you something similar to S0000100.LOG
2. Issue the 'Prune' command as follows:
db2 prune logfile prior to <output from step 1>

Note: you should also consider off-loading inactive logs to tape or
some other secondary media.

HTH.
--
Jeroen

Reply With Quote