June 1, 2009 at 4:09 am
Hi
Ive got a couple of maint plans on a sever that I created using the wizard that just consist of create backups onece a day and delete anything older than 2 days... However the housekeeping part seems to be failign dismally 🙁
I checked the history and it reports as completeing normally .. task detail shows
Maintenance Cleanup on Local server connection
Cleanup Database Backup files
Age: Older than 2 Days
view t-sql shows
EXECUTE master.dbo.xp_delete_file 0,N''D:\DB_Backups\AM'',N''.bak'',N''2009-05-30T05:36:10''
GO
And yet backups with a date of "2009-05-30" still remain !??
what is happening ?!
June 1, 2009 at 5:58 am
Are you having any files that are from 29th, check the time that you specify for deletion 🙂
June 1, 2009 at 7:46 am
The age works with exact dates and times without rounding. Take this case:
Backups complete
2009-05-01 20:00:10 ( 10 second after 8 PM)
2009-05-03 20:00:00 ( at exactly 8 PM)
Two days before the second backup is 2009-05-01 20:00:00 and the earlier backup time is NOT greater than that age timestamp.
Specify the age in hours less a window such as 36 hours.
SQL = Scarcely Qualifies as a Language
June 1, 2009 at 8:10 am
Ive got files in there from the 26th its happily ignoring.... 🙁
changed it too files older than 2 hours....... still no joy !!
June 1, 2009 at 10:25 am
You have a dot in the extension (bak instead of .bak) - remove that and it will work.
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
June 3, 2009 at 7:02 am
Jeffrey Williams (6/1/2009)
You have a dot in the extension (bak instead of .bak) - remove that and it will work.
you are a star !!!
many thanks
~simon
June 3, 2009 at 9:22 am
You are welcome - glad I could help.
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply