How to avoid using the archive log
A recovery cycle for a table space is defined by how often its image copy is taken.
- The latest image copy
- The optional incremental copies
- The log records since the last incremental or image copy
- Archived log records, if all of the log records since the last incremental image copy are not still in active log data sets
- Increase the total active log space.
The total amount of active log space is the number of active log data sets multiplied by its size. Currently, Db2 limits the maximum number of active log data sets to 93. Because each member can have up to 93 active log data sets, the total number of active log data sets is effectively increased by the number of members in a data sharing group.
In Db2 12 function level 500 or later, the size of an active log data set is up to 768 GB, but is usually limited by the size of a tape cartridge. Most installations prefer not to have an archived data set on more than one tape volume.
Recommendation: Do not use tape compression for the Db2 archive log, because Db2 needs to read the log backwards for backout operations. Performance for backout can be severely degraded if tape compression is used.Tape compression is not Db2 data compression, which compresses the data portion of a Db2 log record. With Db2 data compression, the log record header is not compressed and causes no extra performance degradation for backward scans.
- Increase the frequency of incremental image copies.
Because only the log records generated since the last incremental image copy are needed for recovery, the more often you make incremental image copies, the less chance there is that archive log records will be needed. Weigh this consideration against the time it takes to make the incremental image copies and the effects on SQL transactions.
- Make sure applications commit frequently.
To avoid having to mount an archive log for backing out changes, ensure that applications are committing frequently. Consider using the UR CHECK FREQ parameter or the UR LOG WRITE CHECK parameter of installation panel DSNTIPL to help you track when applications are not committing as frequently as your site guidelines suggest.