June 16, 2013 at 11:16 pm
Hi all,
Five days back i created a maintenance plan to delete backup files older than 2 days and the plan is running every day. Today i saw the disk filling up . So i went to maintenance plan history and saw the history. In history it is showing the task is executed successfully. I went to jobs and saw the history there . The jobs are running fine.
I went to the location where where backups are taken. In this location all the backups are existing from the day i created the maintenance plan. I am unable figure it out..
June 17, 2013 at 2:29 am
Any ideas....
June 17, 2013 at 2:32 am
Perhaps you've checked the box "Create a sub-directory for each database" but in the cleanup task you didn't tick "Include first-level subfolders"?
June 17, 2013 at 3:57 am
Also if it's successfully running in BIDS but not in Jobs, you might want to check that the SQL Agent user has access rights to the folder you are deleting from.
June 17, 2013 at 4:38 am
g_demetriou (6/17/2013)
you might want to check that the SQL Agent user has access rights to the folder you are deleting from.
Doesn't the "write" privilege on a folder affect both writing (creating backups) and deleting?
June 17, 2013 at 4:44 am
backup maintenance plan is executing without any failure and created sub folders for every database.
i checked include first level folders in clean up task. task is executing but older backups are not getting deleted.
June 17, 2013 at 5:15 am
How many backup files do you have per database? You're not appending to the same file are you?
Is your File Extention "bak" instead of ".bak"? We use "bak" and the deletion works fine.
June 17, 2013 at 7:36 am
Dird (6/17/2013)
g_demetriou (6/17/2013)
you might want to check that the SQL Agent user has access rights to the folder you are deleting from.Doesn't the "write" privilege on a folder affect both writing (creating backups) and deleting?
Normally, if the same user is being used for both backup and maintenance task. Also it's still possible to have advanced NTFS permissions to deny delete.
Might be worth ruling out by running in BIDS with a user who has delete permissions on the folder. Also could try running the xp_delete_file t-sql in management studio. Also as you mentioned, check the correct file extension has been used.
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply