Modifying the Maintenance Plan to Remove Old Transaction Log Backups

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.
  1. 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”.
  2. Expand the Management branch, then expand the Maintenance Plans Branch. The database maintenance plan defined in the previous procedure will be listed.
    A screenshot of Microsoft SQL Server Management Studio with a maintenance plan selected.
  3. 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.
    A screenshot of Microsoft SQL Server Management Studio showing a maintenance plan in the display pane.
    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. Sublans 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.
    A screenshot of Microsoft SQL Server Management Studio showing a maintenance plan with callouts for the Subplan List and the (Sub)Plan Designer.
  4. 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.
    A screenshot of Microsoft SQL Server Management Studio showing a cleanup task in the designer pane.
  5. Drag a maintenance cleanup task from Maintenance Plan Tasks list in the Toolbox to the Plan Designer pane.
    A screenshot of Microsoft SQL Server Management Studio showing a maintenance cleanup task in the designer pane.
  6. Connect the arrow from the original maintenance cleanup task to the new maintenance cleanup task.
    A screenshot of Microsoft SQL Server Management Studio showing an arrow connecting cleanup tasks in the designer pane.
  7. Double-click the newly added Maintenance Cleanup Task. The Maintenance Cleanup Task Properties window will open.
    A screenshot showing Micrisoft SQL Server Management Studio's Maintenance Cleanup Task Properties dialog window.
  8. Select Local Server Connection in the Connection field.
  9. In the Delete files of the following type section of the window, select the following option:
    • Backup files radio button.
  10. 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.
  11. 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:
      A screenshot showing Micrisoft SQL Server Management Studio's Maintenance Cleanup Task Properties dialog window with properties specified.
  12. Click OK. The Maintenance Cleanup Task Properties window will close, returning you to the plan designer.
    A screenshot of the Microsoft SQL Server Management Studio Save button.
  13. 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”.

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.