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...
Florian Boldt - 27 Jan 2005 20:30 GMT
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/developerworks/db2/library/techarticle/0307kline/0307klin
e.html
cheers
Florian
> 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...
Mark A - 27 Jan 2005 21:06 GMT
> 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.