Solved

How To Configure Database Maintenance Plan to only Backup Last 7 days on SQL 2012

Posted on 2013-11-28
1
310 Views
Last Modified: 2016-02-11
Basically, as the title says, I want to configure my plan to only backup the database every night for the last 7 nights.  anything older than that should be deleted away.

The reason why is space.  The space on my HD is being eaten away rapidly.

Am I going to have to create a custom SSIS package or is there some way to configure the maintenance plan to do it?  Gotta believe there is and that Microsoft, even though often befuddling in their choices, has given me that option.

Thanks
0
Comment
Question by:cat4larry
1 Comment
 
LVL 52

Accepted Solution

by:
Carl Tawn earned 500 total points
ID: 39684343
Under the maintenance task there should be a "Maintenance Cleanup Task" that you can add to the plan to allow you to delete files based on age.

Further info: http://technet.microsoft.com/en-us/library/ms177182.aspx
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
This Micro Tutorial will teach you how to reformat your flash drive. Sometimes your flash drive may have issues carrying files so this will completely restore it to manufacturing settings. Make sure to backup all files before reformatting. This w…
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

943 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now