Db2 – What program to use for the best compression ratio for DB2 log files

compressiondb2linuxlogs

What linux program to use to compress DB2 log files with the best compression ratio?

UPDATE

I thought that these log files would be text type files. But viewing them didn't prove this. I tried to use gzip and zip with up to 88% compression ratio. Which is pretty good.

Still my question is valid. Is there any 'recommended' program to compress DB2 log files?

UPDATE2
– results of my own comparision using maximum/best compression

 5.1M  7zip.mx9.7zip
 7.0M  tarbzip2.bzip2
 8.8M  targzip.tgz
 8.8M  zip.zip

when compressing two files

41M S0045979.LOG
29M S0045980.LOG

Best Answer

In version 10.1, the logs are internally compressed, that means that more information is stored in those files.

But if you want to compress them in order to use less space in your disks, I do not see this like a very good practice, because logs are the only part where the latest data is stored in, and if you want to do a restore, you will have to use the log files, to restore the database with an extra process, and probably, to perform a restore you will need even more space than before (the compressed file + the expanded file).

Presonally, this compress operation adds "noise" to the disaster recovery strategy, how are you going to check if a compressed file is ok or not?

Finally, if you want to do a thing like this, you could use the userexit option in order to implement your own process to take the online logs and pass them as offline logs. In this process you could compress and extract the files.

BTW, why don't you use circular logs? Any enterprise knows the importance of archive logs.