DB2 Version 9.7 for Linux, UNIX, and Windows

Protecting recovery history file entries from being pruned

You can prevent key recovery history file entries from being pruned, and associated recovery objects from being deleted by setting the status of the recovery history files entries to do_not_delete.

About this task

You can remove (prune) recovery history file entries using the PRUNE HISTORY command, the ADMIN_CMD procedure with PRUNE_HISTORY, or the db2Prune API. If you use the AND DELETE parameter with PRUNE HISTORY, or the DB2PRUNE_OPTION_DELETE flag with db2Prune, and the auto_del_rec_obj database configuration parameter is set to ON, then the associated recovery objects will also be physically deleted.

The database manager also prunes the recovery history file entries as part of automated pruning. If the auto_del_rec_obj database configuration parameter is set to ON, the database manager will delete the recovery objects associated with any entries that are pruned.

Procedure

To protect key recovery history file entries and associated recovery objects:

Use the UPDATE HISTORY command, the db2HistoryUpdate API, or the ADMIN_CMD procedure with "UPDATE_HISTORY" to set the status for key recovery file entries to do_no_delete

There are three ways to prune entries marked do_not_delete:

Those entries that are marked do_not_delete will never be pruned from the recovery history file unless you perform one of these three procedures.

Restrictions: