Link to home
Start Free TrialLog in
Avatar of TexasGaidheal
TexasGaidhealFlag for United States of America

asked on

Need to find and delete existing backups, then modify maintenance plan to delete old backups

I have a disk space problem on a SQL Server 2008 system caused by a maintenance plan (which I did not create) which does daily backups, creating new backup files with each backup. The plan does nothing to delete old backups, with the result that I am running out of disk space.

I am not an experienced SQL Server DBA; I have never used the Maintenance Plan Wizard or the editor that is used to modify existing maintenance plans, so any instructions will have to be fairly detailed.

Problem 1: I need to find where the backup files are, so that I can see how big they are , so that I can decide how many of them I need to delete, as an immediate manual cleanup. I could find them with Windows explorer on the server, and see how big they are, but I suspect that deleting them at that point would not be a good idea. How can I find and manually delete these backups with the SQL Server Management Studio? I expect that it should be possible, but I have found nothing yet by digging through the Object explorer and the multitude of subitems and menus.

Problem 2: editing the existing backup maintenance plan so that it deletes old backups when new ones are created. As I said above, I have never created or modified a maintenance plan. I can see from answered questions that I need to do a Modify on the existing maintenance plan and add a Cleanup Task, but I see that there are two kinds of Cleanup Task available: History Cleanup Task and Maintenance Cleanup task. I need to know which one I should use and detailed instructions as to how I should integrate it into the existing plan. I can drag one of the tasks from the toolbox into the design pane, but I have no idea of what to do next. (The amount of documentation and help files in SQL Server Management Studio is so large and poorly indexed as to be useless.)
ASKER CERTIFIED SOLUTION
Avatar of Sharath S
Sharath S
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
In maintenance plan itself has a tool "Maintenance Cleanup task" where you have the option to delete old files (including backup file).

User generated image