History Cleanup Task

The History Cleanup task deletes entries in the following history tables in the SQL Server msdb database.

  • backupfile

  • backupfilegroup

  • backupmediafamily

  • backupmediaset

  • backupset

  • restorefile

  • restorefilegroup

  • restorehistory

    By using the History Cleanup task, a package can delete historical data related to backup and restore activities, SQL Server Agent jobs, and database maintenance plans.

    This task encapsulates the sp_delete_backuphistory system stored procedure and passes the specified date to the procedure as an argument. For more information, see sp_delete_backuphistory (Transact-SQL).

Configuration of the History Cleanup Task

The task includes a property for specifying the oldest date of data retained in the history tables. You can indicate the date by number of days, weeks, months, or years from the current day, and the task automatically translates the interval to a date.

You can set properties through SSIS Designer. This task is in the Maintenance Plan Tasks section of the Toolbox in SSIS Designer.

For more information about the properties that you can set in SSIS Designer, click the following topic:

See Also

Integration Services Tasks
Control Flow