Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Maintenance Plan Clean up task not deleting all .bak files Expand / Collapse
Author
Message
Posted Friday, August 2, 2013 7:22 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Monday, October 28, 2013 5:13 AM
Points: 61, Visits: 721
Hi,

I have a maintenance plan that backs up my databases and deletes any .bak files older than 2 days old. I am running this on 2008 R2 and it sometimes work fine. Other times it randomly leaves behind a few (between 2-5) of the 9 databases being backed up. It doesn't leave behind specific ones it just seems random.

Does anyone know any known bugs or problems like this?

Thanks for any help.
Post #1480382
Posted Friday, August 2, 2013 2:56 PM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Tuesday, September 16, 2014 12:34 AM
Points: 51, Visits: 406
If you have .bak as the in the file extension field, change it to only bak without any dots/asterisks and try again.


Post #1480618
Posted Monday, August 5, 2013 3:08 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Monday, October 28, 2013 5:13 AM
Points: 61, Visits: 721
Hi,

I do not have the . before the bak sorry, that was just to explain what type of file they were. I have encountered that problem before and learnt from it! It does delete some backs up but not all.
Post #1480843
Posted Monday, August 5, 2013 3:51 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Tuesday, September 16, 2014 12:34 AM
Points: 51, Visits: 406
You could try a couple of other things like:

1. Have a look at your maintenace plan, click edit on the subplan and click on view t-sql. Any problems there?
2. Delete your maintenance plan and just create a new one, this has worked for my on a couple of occasions.
3. Create a new maintenance plan that does what your original plan, point it to another folder and test it for one
small database.

Is your instance RTM version? Maybe there is a SP or CU that will solve this, always seems to be some problems with
maintenance plans and early versions of SQL Server.


I would recommend you to have a look at Ola Hallengrens maintenance solution http://ola.hallengren.com.
It is a great solution for backups and mainteance that has made my life much easier. Spend a couple of hours testing
it and I assure you that you will start using it instead of the built in maintenance plans.
Post #1480856
Posted Tuesday, August 6, 2013 9:05 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Yesterday @ 11:20 AM
Points: 246, Visits: 663
raadee (8/5/2013)


I would recommend you to have a look at Ola Hallengrens maintenance solution http://ola.hallengren.com.
It is a great solution for backups and mainteance that has made my life much easier. Spend a couple of hours testing
it and I assure you that you will start using it instead of the built in maintenance plans.


I would second this - Once you learn Ola's framework, the built in maintenance plans will make your skin crawl.
Post #1481390
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse