Solved

SQL 2012 - Maintenance cleanup

Posted on 2014-07-28
8
146 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 34

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
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 

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 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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Suggested Solutions

Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
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 extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

738 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