Maintenance Plan Wizard (Define History Cleanup Task Page)

Use the Define History Cleanup Task page to discard old task history. This task deletes the records of when certain types of jobs occurred.

This statement uses the sp_purge_jobhistory, sp_maintplan_delete_log, and sp_delete_backuphistory statements to remove history information from the msdb tables.

Important

The addition of the Hour interval in cleanup tasks has implications when you are running multiple version of SQL Server 2005. If you create a task that has an interval of hours, and then try to run that task on either the release version of SQL Server 2005 or SQL Server 2005 Service Pack 1, you will get a different interval. If you edit the task using the earlier versions of the tools, an error message will appear.

Options

  • Backup and restore history
    Retaining records of when recent backups were created can help SQL Server create a recovery plan when you want to restore a database. The retention period should be at least the frequency of full database backups.
  • SQL Server Agent Job history
    This history can help you troubleshoot failed jobs, or determine why database actions occurred.
  • Maintenance Plan history
    This history can help you troubleshoot failed maintenance plan jobs, or determine why database actions occurred.
  • Remove historical data older than
    Specify age of items that you want to delete.

See Also

Other Resources

sp_purge_jobhistory (Transact-SQL)
sp_delete_backuphistory (Transact-SQL)

Help and Information

Getting SQL Server 2005 Assistance

Change History

Release History

15 September 2007

New content:
  • Added the Important note about the Hour interval.