Solved

SQL 2012 - Maintenance cleanup

Posted on 2014-07-28
8
132 Views
Last Modified: 2014-09-04
Hi all,

Im trying to run a maintenance cleanup as part of my maintenance plan. I run a full SQL backup nightly to a drive configured as F:\ The full backups are running but the maintenance cleanup task doesnt appear to be clearing down the  the files older than 7 days.

Am I missing something?
0
Comment
Question by:Matt
  • 4
  • 3
8 Comments
 
LVL 33

Expert Comment

by:ste5an
ID: 40224297
I would guess so. How have you set it up? Take a closer look at the folder value.

Cleanup settings
0
 

Author Comment

by:Matt
ID: 40224326
missing .bak

thank you will test and get back.
0
 
LVL 29

Expert Comment

by:Rich Weissler
ID: 40232377
Make certain you don't have a period before the 'bak'.  (And frequently, you need to clean up trn files as well.)
If you use a separate subdirectory for each database, be certain you select that option in the cleanup tool.
0
 

Author Comment

by:Matt
ID: 40245759
Hi all,

This still isnt working for me. Attached a screen shot of settings. All BAK files are in the root of F:\
0
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.

 

Author Comment

by:Matt
ID: 40245772
sql
0
 
LVL 29

Expert Comment

by:Rich Weissler
ID: 40245803
That screen looks correct.  Lets drop back a few yards and confirm assumptions:
1. The backup files you want to get to go away are written to the root directory of F:.
2. The backup files are being created by the SQL Maintenance task, from this same instance of SQL.
3. The maintenance job is scheduled and does successfully run.  (And you can confirm in the job history, that there are no errors.)
4. The job runs with the same results regardless of whether it runs on the schedule, or is manually initiated by an administrator.
0
 

Author Comment

by:Matt
ID: 40245838
1. Yes
2. Yes
3. Yes
4. Not tested.

Screen shot of task.
task
Backup task
sql3.JPG
0
 
LVL 29

Accepted Solution

by:
Rich Weissler earned 500 total points
ID: 40247125
Hmm... Well, neglecting the 'shrink database operation' in there for the moment, (but really, don't do that) if not a single one of those earlier tasks are failing, I don't see any reason for this not to work.  On the flip side, if any single one of those tasks DOES fail, then nothing after it will run.  (The reason is that all those arrows are green, which means the next job will run on success.  You can right click the arrows to change them to blue 'completion' arrows, if you like... or remove the arrow leading into the cleanup object which means it will run concurrent to the other tasks... or put the different tasks in their own schedule...)

Other than that, I don't see any reason it wouldn't be running.
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Suggested Solutions

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
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…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…

919 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