Although you have always been able to manually prune and update the status of recovery historyfile entries, it is highly recommended that you configure DB2 to automatically do this for you toavoid manual errors To configure DB2 to automatically delet...
显示全部Although you have always been able to manually prune and update the status of recovery history
file entries, it is highly recommended that you configure DB2 to automatically do this for you to
avoid manual errors
To configure DB2 to automatically delete unneeded backup images:
1. Set the AUTO_DEL_REC_OBJ database configuration parameter to ON.
2. Set the num_db_backups database configuration parameter to the number of backups to
keep (default is 12).
3. Set the rec_his_retentn database configuration parameter to the number of days of
recovery history information to keep (default is 366).
The num_db_backups database configuration parameter defines the number of database backup
images to retain for a database.
The rec_his_retentn database configuration parameter defines the number of days that historical
information on backups will be retained.
For example, if you take weekly backups on the sample database, and would like DB2 to keep at
least a month’s worth of backups, and prune everything older than 45 days, you can run the
following commands:
db2 update db cfg for sample using auto_del_rec_obj on;
db2 update db cfg for sample using num_db_backups 4;
db2 update db cfg for sample using rec_his_retentn 45;
收起