Share via


Maintenance Plan Wizard (Define Maintenance Cleanup Task Page)

Use the Maintenance Cleanup Task to remove old files related to maintenance plans, including text reports created by maintenance plans and database backup files.

Note

In contrast to earlier versions of the Maintenance Cleanup task, the SQL Server 2008 version of the task does not automatically delete files in the subfolders of the specified directory. This precaution reduces the possibility of a malicious attack that uses the Maintenance Cleanup task to delete files. If you want to delete files in first-level subfolders, you must select Include first-level subfolders.

Options

  • Backup files
    Delete database backup files.

  • Maintenance Plan text reports
    Delete text reports of previously run maintenance plans.

  • Delete specific file
    Delete the specific file provided in the File name text box.

  • Search folder and delete files based on an extension
    Delete all files with the specified extension in the specified folder. Use this to delete multiple files at once, such as all backup files in the Tuesday folder with the .bak extension.

  • Folder
    Path and name of the folder containing the files to be deleted.

  • File extension
    Provide the file extension of the files to be deleted.

  • Include first-level subfolders
    Delete files with the extension specified for File extension from first-level subfolders under the folder specified in Folder.

  • Delete files based on the age of the file at task run time
    Specify the minimum age of the files that you want to delete by providing a number, and unit of time in the Delete files older than the following box.

  • Delete files older than the following
    Specify the minimum age of the files that you want to delete by providing a number, and unit of time (Hour, Day, Week, Month, or Year). Files older than the time frame specified will be deleted.

See Also

Concepts