question

neeehar avatar image
neeehar asked

not able to delete old backup files but jobs is sucessfull sql 2000

We use DTS to backup the database and delete old backup files older than a day backup job is successfull but the old backup files are not getting delete. SA is the user. i avoided simple backup from the back up list. Will sp_delete_backuphistory help in fixing this problem. Suggestions..
sql-server-2000dtsdeletebackupsmaintenance
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

KenJ avatar image
KenJ answered
One of the joys of doing backups with DTS or SSIS maintenance plans is that they are prone to fail while reporting success. You might want to follow up your backups with a windows batch script to delete the older files. Rather than repeating, I'll point you to this approach on stackoverflow: [ http://stackoverflow.com/questions/51054/batch-file-to-delete-files-older-than-n-days][1] [1]: http://stackoverflow.com/questions/51054/batch-file-to-delete-files-older-than-n-days
2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

This cat has definitely been thoroughly skinned over the years
2 Likes 2 ·
neeehar avatar image
neeehar answered
the question is it worked in the past but does not do now. I can use the vb code but need to convenence my boss that vb script or a tsql script is the only way.
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

You can delete then recreate the package and it may or may not fix it. Sp delete backup history won't get rid of old file it will just remove the history. The script based approach is not guaranteed to be the only solution just the most reliable one based on my experience and that of some others. I don't have anything you can take to your boss
1 Like 1 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.