Maintenance plans

  • 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..

  • Any ideas....

  • 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"?


    Dird

  • 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.

  • 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?


    Dird

  • 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.

  • 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.


    Dird

  • 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