As of DB2® V10.1,
you can compress archived log files. This capability, in addition
to data and index compression, along with backup compression, reduces
the amount of disk space required for your database environment.
Archived log files are the third major space consumer for roll-forward
recoverable databases. Archived log files contain a significant amount
of data and these archives can grow quickly. If modified data is already
in compressed tables, logging is reduced by virtue of including compressed
record images in log records. Compression of archived log files further
increases storage savings, even in these environments.
To use compression for your archived log files, you can use the UPDATE
DB CFG command to set the logarchcompr1 and logarchcompr2 configuration
parameters to ON.
Restrictions
- Archived log file compression does not take effect under the following
conditions.
- The corresponding archived log file method is not set to DISK, TSM,
or VENDOR. When the corresponding archived log file
method is set as described, the log files are physically moved out
of the active log path, or the mirror log path.
- Whenever archived log file compression is enabled, but the corresponding
log archiving method is set to OFF, LOGRETAIN or USEREXIT,
archived log file compression has no effect. Any update to the logarchmeth1 and logarchmeth2 or
the logarchcompr1 and logarchcompr2 database
configuration parameters which results in such a scenario returns
a warning, SQL1663W.
Note: When the database is activated,
SQL1663W is not returned when setting or changing archived log file
compression database configuration parameters. Instead, SQL1363W is
returned, which is a higher priority message. If the database is not
activated, the SQL1663W warning message is returned.
- Manual archiving and retrieval with db2adutl.
- The db2adutl utility does not perform compression
or decompression during UPLOAD or EXTRACT operations.
Movement of compressed log files to and from the archive location
is fully supported by db2adutl.
- If logs are uploaded to Tivoli® Storage
Manager with db2adutl, and you want to compress
archived log files, archived log file compression must be enabled
when the logs are archived to the disk location, before db2adutl picks
them up. If compressed logs are retrieved manually with db2adutl,
they are decompressed on first access.
- Archived log file compression is not supported when raw devices
are used for database logging.
- Archived log file compression is not supported when either the logpath or
the newlogpath database configuration parameters
point to a raw device. Any database configuration update that results
in archived log file compression being enabled while logpath or newlogpath database
configuration parameters point to raw devices fails, SQL1665N.
- When enabling archived log file compression using the logarchcompr1 and logarchcompr2 database
configuration parameters, logs already stored in a backup image are
not affected.