Automatic archive log deletion

You can use a disk or tape management system to delete archive log data sets or tapes automatically.

The length of the retention period (in days), which is passed to the management system in the JCL parameter RETPD, is determined by the RETENTION PERIOD field on the DSNTIPA installation panel.

The default for the retention period keeps archive logs forever. Any other retention period must be long enough to contain as many recovery cycles as you plan for. For example, if your operating procedures call for a full image copy every sixty days of the least frequently-copied table space, and you want to keep two complete image copy cycles on hand at all times, you need an archive log retention period of at least 120 days. For more than two cycles, you need a correspondingly longer retention period.

Tip: In case of data loss or corruption, retain all Db2 recovery log and image copy data sets until you can identify the source of the data loss or corruption. You might need these data sets to aid in nonstandard recovery procedures. On at least a weekly basis, take an image copy backup of every Db2 table space object that was updated and retain the Db2 recovery log data sets for a minimum of seven days. If you detect data loss or corruption, prevent older Db2 recovery log and image copy data sets from being discarded until the issue is assessed and resolved.

If archive log data sets or tapes are deleted automatically, the operation does not update the archive log data set inventory in the BSDS. You can update the BSDS with the change log inventory utility. This update is not required and recording old archive logs in the BSDS wastes space. However, it does no harm because the archive log data set inventory wraps and automatically deletes the oldest entries.