Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Maintenance plan delete sometimes fails


Maintenance plan delete sometimes fails

Author
Message
cphite
cphite
SSC-Enthusiastic
SSC-Enthusiastic (138 reputation)SSC-Enthusiastic (138 reputation)SSC-Enthusiastic (138 reputation)SSC-Enthusiastic (138 reputation)SSC-Enthusiastic (138 reputation)SSC-Enthusiastic (138 reputation)SSC-Enthusiastic (138 reputation)SSC-Enthusiastic (138 reputation)

Group: General Forum Members
Points: 138 Visits: 650
I have a strange issue... in addition to our normal backups, there are a bunch of databases on our production SQL server that I backup nightly to an attached drive. We have a separate server that we use for developing reports against, and I use these backups every month or so to copy over the most recent data.

Anyway, the setup is very simple - I have a maintenance plan that first deletes any files in my folder older than one day, then it backs up the databases.

My problem is that occasionally the delete step appears not to work. I don't see any errors in SQL or in the event logs on the server; it just fails to actually delete the previous backups. Unfortunately the drive is only large enough to keep one days worth, so the last few fail.

I am wondering if anyone has any idea why these deletes would be failing and how to resolve this.
UconnDBA
UconnDBA
Valued Member
Valued Member (73 reputation)Valued Member (73 reputation)Valued Member (73 reputation)Valued Member (73 reputation)Valued Member (73 reputation)Valued Member (73 reputation)Valued Member (73 reputation)Valued Member (73 reputation)

Group: General Forum Members
Points: 73 Visits: 444
Probably a timing issue. Its not seeing the previous days backup as actually older than 1 day yet. To get around this can set maint plan to delete older than, say, 23 hours.

Also, I understand you only have room for only 1 days backup, but I would caution you not to delete the only backup you have before creating another backup. If your backup should fail you will now have no backups. Either get more disk space for multiple backups and/or copy your existing backup to another server or tape before deleting.
cphite
cphite
SSC-Enthusiastic
SSC-Enthusiastic (138 reputation)SSC-Enthusiastic (138 reputation)SSC-Enthusiastic (138 reputation)SSC-Enthusiastic (138 reputation)SSC-Enthusiastic (138 reputation)SSC-Enthusiastic (138 reputation)SSC-Enthusiastic (138 reputation)SSC-Enthusiastic (138 reputation)

Group: General Forum Members
Points: 138 Visits: 650
Hmmm... I hadn't considered that Smile I will try changing to 23 hours and see if that does it.

As for the one copy thing, these backups are for my convenience only; they are in addition to our primary backups, which have been working without issue.
Yuri55
Yuri55
SSC-Addicted
SSC-Addicted (446 reputation)SSC-Addicted (446 reputation)SSC-Addicted (446 reputation)SSC-Addicted (446 reputation)SSC-Addicted (446 reputation)SSC-Addicted (446 reputation)SSC-Addicted (446 reputation)SSC-Addicted (446 reputation)

Group: General Forum Members
Points: 446 Visits: 1963
Just to confirm that changing backup retention period from 1 day to 23 hours solved this mystery (from time to time failed old backup cleaning) for me too
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