Discussion:
Controlling DB2 log file growth
(too old to reply)
k***@infostream.com.au
2007-09-17 23:31:33 UTC
Permalink
Need some help controlling db2 log files. The Transaction logs below keep getting generated, and using up disk space, but the old ones are not deleted. Am i missing some configuration setting to do this? How do i get the DB2 to delete old transaction log files?

/global/infostream/home/db2info/db2info/NODE0000/SQL00001/SQLOGDIR/S0008098.LOG
/global/infostream/home/db2info/db2info/NODE0000/SQL00001/SQLOGDIR/S0008099.LOG
/global/infostream/home/db2info/db2info/NODE0000/SQL00001/SQLOGDIR/S0008100.LOG
/global/infostream/home/db2info/db2info/NODE0000/SQL00001/SQLOGDIR/S0008101.LOG
/global/infostream/home/db2info/db2info/NODE0000/SQL00001/SQLOGDIR/S0008102.LOG
/global/infostream/home/db2info/db2info/NODE0000/SQL00001/SQLOGDIR/S0008103.LOG

Thanks for your help...
Mark A
2007-09-17 23:51:49 UTC
Permalink
Post by k***@infostream.com.au
Need some help controlling db2 log files. The Transaction logs below keep
getting generated, and using up disk space, but the old ones are not
deleted. Am i missing some configuration setting to do this? How do i get
the DB2 to delete old transaction log files?
/global/infostream/home/db2info/db2info/NODE0000/SQL00001/SQLOGDIR/S0008098.LOG
/global/infostream/home/db2info/db2info/NODE0000/SQL00001/SQLOGDIR/S0008099.LOG
/global/infostream/home/db2info/db2info/NODE0000/SQL00001/SQLOGDIR/S0008100.LOG
/global/infostream/home/db2info/db2info/NODE0000/SQL00001/SQLOGDIR/S0008101.LOG
/global/infostream/home/db2info/db2info/NODE0000/SQL00001/SQLOGDIR/S0008102.LOG
/global/infostream/home/db2info/db2info/NODE0000/SQL00001/SQLOGDIR/S0008103.LOG
Thanks for your help...
1. You can set the db config to use circular logging, but you will not be
able to use rollforward recovery.

2. You can set the LOGARCHMETH1 to a path on hard drive, and DB2 will move
the archive logs to the directory you specify. You still have to delete the
archive log files eventually, but it is easier (and safer) to determine
which ones to delete if you are only deleting archive logs, and not active
logs. This requires version 8.2.
Kelly Schlamb
2007-09-18 00:08:32 UTC
Permalink
It looks as though your database is configured to be recoverable (versus using circular logging). However, you have to decide how you want to manage the log files that are generated. If you do not wish to keep them in the log path (most do not) then you need to consider where you want them archived to. They can be archived to another disk location, to TSM, etc. Take a look at the LOGARCHMETH1 database configuration parameter.

If you do not actually the need the log files for the purpose of rolling forward the database then you can convert back to circular logging )and you won't need to manage log files at all).

Regards,
Kelly

Continue reading on narkive:
Loading...