This is a discussion on reduce size of log files? within the DB2 forums, part of the Database Server Software category; --> Is there any way to reduce the size of my db2 log files? My sqlogdir is 69gb with hundreds ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Is there any way to reduce the size of my db2 log files? My sqlogdir is 69gb with hundreds of log files, more than the size of the database itself, and I am running out of hard disk space. I am thinking one way would be to create a new database and then export the tables one by one to this new database. Any other way to do this? What happens if I simply delete the log files? Thank you very much for all help... |
| |||
| Sue, you might want to switch on the userexit to archive the unused log files to a backup device. You can find a sample userexit by searching for file db2uext2. Have a look at the administration guide, topics: user exit, log retain. I think you don't want to resize the log file size, you just want to get rid of the old stuff (which you may need for recovery later) in the logdir, right? If you want to delete old log files you can determine the First active log file by issuing the command: db2 get db cfg for dbname and have a look at "First active log file". Be careful, make sure you understand the two different looging methods (circular and archival). This document might help to get more information: http://www-106.ibm.com/developerwork...0307kline.html cheers Florian Sue wrote: > Is there any way to reduce the size of my db2 log files? My sqlogdir is > 69gb with hundreds of log files, more than the size of the database > itself, and I am running out of hard disk space. I am thinking one way > would be to create a new database and then export the tables one by one > to this new database. Any other way to do this? What happens if I > simply delete the log files? Thank you very much for all help... > |
| ||||
| "Sue" <sea_099@hotmail.com> wrote in message news:1106856773.631566.200230@f14g2000cwb.googlegr oups.com... > Is there any way to reduce the size of my db2 log files? My sqlogdir is > 69gb with hundreds of log files, more than the size of the database > itself, and I am running out of hard disk space. I am thinking one way > would be to create a new database and then export the tables one by one > to this new database. Any other way to do this? What happens if I > simply delete the log files? Thank you very much for all help... > In addition to reducing the size of the log files, you need to figure out how to reduce the number of duplicate postings to this newsgroup. You can use the Control Center to change the number and size of log files. Or you can do it with "db2 update db cfg using parm-name xxx" command. You can use "db2 get db cfg for db-name" to see what the sizes are now and what parm-name you want to change. The new values will be effective when you restart the database. |