Monday, April 23, 2012

sp_delete_backuphistory

MSDB database keeps track of all backup and restore information, when the backup was generated, who took the backup, what time backup generated, backup file list, backup media information and restore information etc., Over a period of time the database size becomes huge. So it is recommended to to run the sp_delete_backuphistory SP periodically to clean up and reduce size of the database.

sp_delete_backuphistory

It deletes records from the MSDB database older than the oldest date

Example

sp_delete_backuphistory '01/01/2012' --> Removes all oldest information from the database.

No comments: