At this point you have created a maintenance plan to create daily full backups, incremental (transaction log) backups every 2 hours, and to remove full backup files that are more than 2 weeks old. In addition to this, it is imperative that you modify the maintenance plan to remove incremental (transaction log) backups that are more than 2 weeks old.
![]() | Note: Failure to modify the maintenance plan to remove incremental (transaction log) backups will result in a situation where over time, your incremental (transaction log) backups will consume all available storage space. |
- Open the SQL Server Management Studio for MS SQL Server 2005. If it is not already open, refer to “Connecting to SQL Server with the Management Studio”.
- Expand the Management branch, then expand the Maintenance Plans Branch. The database maintenance plan defined in the previous procedure will be listed.
- Double-click the Maintenance Plan defined in the previous procedure. The maintenance plan will open in the display pane on the right side portion of the window.
The display pane shows the Plan properties, including the subplan list and the plan designer. The subplan list displays all subplans that have been defined for the plan. Subplans include maintenance tasks defined in the previous procedure. When a subplan is selected in the list, tasks related to the plan appear in the Plan Designer in the bottom-right portion of the pane.
- Select Subplan_3 in the subplan list. This corresponds to the maintenance cleanup tasks defined in the previous procedure. When selected, the tasks assigned to the plan will appear in the Plan Designer. In this case, since Subplan_3 is the maintenance cleanup task defined in the previous procedure, the maintenance cleanup task should be displayed in the designer pane.
- Drag a maintenance cleanup task from Maintenance Plan Tasks list in the Toolbox to the Plan Designer pane.
- Connect the arrow from the original maintenance cleanup task to the new maintenance cleanup task.
- Double-click the newly added Maintenance Cleanup Task. The Maintenance Cleanup Task Properties window will open.
- Select Local Server Connection in the Connection field.
- In the Delete files of the following type section of the window, select the following option:
- Backup files radio button.
- In the File Location section of the window, select the following option:
- Search folder and delete files based on an extension radio button.
- Browse to and select the backup folder selected in the previous procedure for saving backup files.
- Enable the Include first-level subfolders checkbox.
- In the File age section select the following options:
- Enable the Delete files based on the age of the file at task run time checkbox.
- Delete files older than 2 Weeks.
When finished, the Maintenance Cleanup Task Options should look like the following screen capture:
- Click OK. The Maintenance Cleanup Task Properties window will close, returning you to the plan designer.
- Click Save (
). The modified maintenance plan will be saved.
At this point you have modified your database maintenance plan to automatically remove incremental (transaction log) database backups that are more than 2 weeks old. Please continue to “Post Implementation Steps”.