DB2 10.5 for Linux, UNIX, and Windows

Automating recovery history file pruning

You can configure the database manager to automatically prune and update the status of recovery history file entries.

You can manually update the status of entries in the recovery history file using the UPDATE HISTORY command, the db2HistoryUpdate API, or the ADMIN_CMD procedure with the "UPDATE_HISTORY" parameter. You can use the PRUNE HISTORY command, the db2Prune API, or the ADMIN_CMD procedure with the "PRUNE_HISTORY" parameter to manually remove, or prune, entries from the recovery history file. However, it is recommended that you configure the database manager to manage the recovery history file instead of updating and pruning the recovery history file manually.

The database manager automatically updates and prunes recovery history file entries at the following times:

During automated pruning, the database manager performs two operations:

  1. Updates the status of the recovery history file entries

  2. Prunes expired recovery history file entries

The database manager updates the recovery history file entries in the following way:

The following database configuration parameters control which entries the database manager prunes:
num_db_backups
Specifies the number of database backups to retain for a database.
rec_his_retentn
Specifies the number of days that historical information about backups is retained.
auto_del_rec_obj
Specifies whether the database manager deletes log files, backup images, and load copy images that are associated with recovery history file entries that are pruned.

To configure the database manager to automatically manage the recovery history file, set the following configuration parameters:

When auto_del_rec_obj is set to ON, and whenever there are more successful database backup entries than the num_db_backups configuration parameter, then the database manager automatically prunes recovery history file entries that are older than rec_his_retentn.