Thursday 25 December 2014

History Cleanup Task

This task allows for the cleanup of historical activity data. It will clean up the history for database maintenance plans, backup activates, restore activities and SQL Server agent jobs. Maintenance Cleanup Task: This task allows for the cleanup of backup files, and the reports of maintenance plans.
The History Cleanup task deletes entries in the following history tables in the SQL Server msdb database.
Ø  backup file
Ø  backupfilegroup
Ø  backupmediafamily
Ø  backupmediaset
Ø  back upset
Ø  restore file
Ø  restorefilegroup
Ø  restore history
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.

Step by step History Cleanup Task
Take History cleanup task


Double click on history cleanup task

Create new connection.

Write the connection name and server name. You can select Windows authentication mode and click ok.

Select the historical data you delete.
Ø  Backup and restore history
Ø  SQL Server Agent job history
Ø  Maintenance plan history
Select the time period it may be

Click ok.
If you want to see the T-SQL  then click on view T-SQL button

Click OK .
Before executing the package just open the sql server and see the Maintenance plan view history I have following log value.

Now you can execute the package.

Now you can see the Maintenance plan view history


All old history is cleaned. 

No comments:

Post a Comment

If you have any doubt, please let me know.

Popular Posts