I want to delete files from backup activities using xp_delete_files, I created a new maintenance plan to delete *.bak and *.trn files.
Both doesn't work and no error message is generated.
The T-SQL statement being made is:
When I run it in a query window using my own account it fails as well without a message.
The instance is version 9.0.3080 SP2 standard edition on a 64 bit platform.
You need to have sysadmin privileges - can you confirm that you are running the maintenance plan with a user with those rights, and that when you try it in a query window you have the right privileges.
answered May 25, 2010 at 09:27 AM
Kev Riley ♦♦
The joys of using undocumented commands.
However, there is some useful information here: http://sqlblog.com/blogs/andy_leonard/archive/2009/03/11/xp-delete-file.aspx - this link shows a further parameter that your code doesn't have. Perhaps this is the problem?
answered May 28, 2010 at 11:42 AM