?
Solved

SQL 2012 - Maintenance cleanup

Posted on 2014-07-28
8
Medium Priority
?
151 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
8 Comments
 
LVL 35

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 30

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
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

 

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
 

Author Comment

by:Matt
ID: 40245772
sql
0
 
LVL 30

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 30

Accepted Solution

by:
Rich Weissler earned 1500 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

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
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.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Suggested Courses

752 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