SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Maintenance Plan Clean up task not deleting all .bak files


Maintenance Plan Clean up task not deleting all .bak files

Author
Message
sqlrd22
sqlrd22
SSC-Addicted
SSC-Addicted (439 reputation)SSC-Addicted (439 reputation)SSC-Addicted (439 reputation)SSC-Addicted (439 reputation)SSC-Addicted (439 reputation)SSC-Addicted (439 reputation)SSC-Addicted (439 reputation)SSC-Addicted (439 reputation)

Group: General Forum Members
Points: 439 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.
raadee
raadee
SSC-Enthusiastic
SSC-Enthusiastic (185 reputation)SSC-Enthusiastic (185 reputation)SSC-Enthusiastic (185 reputation)SSC-Enthusiastic (185 reputation)SSC-Enthusiastic (185 reputation)SSC-Enthusiastic (185 reputation)SSC-Enthusiastic (185 reputation)SSC-Enthusiastic (185 reputation)

Group: General Forum Members
Points: 185 Visits: 476
If you have .bak as the in the file extension field, change it to only bak without any dots/asterisks and try again.
sqlrd22
sqlrd22
SSC-Addicted
SSC-Addicted (439 reputation)SSC-Addicted (439 reputation)SSC-Addicted (439 reputation)SSC-Addicted (439 reputation)SSC-Addicted (439 reputation)SSC-Addicted (439 reputation)SSC-Addicted (439 reputation)SSC-Addicted (439 reputation)

Group: General Forum Members
Points: 439 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.
raadee
raadee
SSC-Enthusiastic
SSC-Enthusiastic (185 reputation)SSC-Enthusiastic (185 reputation)SSC-Enthusiastic (185 reputation)SSC-Enthusiastic (185 reputation)SSC-Enthusiastic (185 reputation)SSC-Enthusiastic (185 reputation)SSC-Enthusiastic (185 reputation)SSC-Enthusiastic (185 reputation)

Group: General Forum Members
Points: 185 Visits: 476
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.
tim_harkin
tim_harkin
SSChasing Mays
SSChasing Mays (615 reputation)SSChasing Mays (615 reputation)SSChasing Mays (615 reputation)SSChasing Mays (615 reputation)SSChasing Mays (615 reputation)SSChasing Mays (615 reputation)SSChasing Mays (615 reputation)SSChasing Mays (615 reputation)

Group: General Forum Members
Points: 615 Visits: 925
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.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search