Automating database recovery object management
You can use the auto_del_rec_obj database configuration parameter and automated recovery history file pruning to configure the IBM® Data Server database manager to automatically delete unneeded recovery objects after every full database backup operation.
About this task
- There are more database backup entries in the recovery history file than the value of the num_db_backups configuration parameter.
- The database backup entries do not have their status set to do_not_delete.
- The database backup entries from the recovery history file are
older than the value specified by the rec_his_retentn configuration
parameter.Note: If the rec_his_retentn configuration parameter is set to 0, then the automatic pruning is based on the setting for the num_db_backups parameter.
If you set the auto_del_rec_obj database configuration parameter to ON, then the database manager will do the following in addition to pruning entries from the recovery history file:
- Delete the physical log files associated with the pruned entries
- Delete the backup images associated with the pruned entries
- Delete the load copy images associated with the pruned entries
If there are no full database backup images available for consideration in the current recovery history (perhaps none were ever taken), then images older than the range of time specified by rec_his_retentn will be deleted.
If the database manager is unable to delete a file because the file is no longer at the location listed in the recovery history file, then the database manager will prune the history entry.
If the database manager is unable to delete a file because of a communication error between the database manager and the storage manager or device, then the database manager will not prune the history file entry. When the error is resolved, the file can be deleted during the next automated prune.
Procedure
To configure the database manager to automatically delete unneeded recovery objects:
Example
- auto_del_rec_obj=ON
- rec_his_retentn=0
- num_db_backups=3
- auto_del_rec_obj=ON
- rec_his_retentn=15
- num_db_backups=3