I have a sql 2008 maintenance plan to backup databases and to delete old bak files. The db backup works but the delete does not. I do not get any error messages, all steps marked successful. So, I copied the sql statement EXECUTE master.dbo.xp_delete_file 0,N'Z:\SQL BACKUPS\',N'bak',N'2010-11-14T12:43:35',1 and tried to execute in a query window. I have a successful completion message, BUT the files are not deleted. I have ensured that the extension is bak and the folder is correct and the account has sysadmin on the server and is a sql sa. I have tried many options and no success.
We are version Microsoft SQL Server 2008 (SP1) - 10.0.2531.0 (X64) Mar 29 2009 10:11:52 Copyright (c) 1988-2008 Microsoft Corporation Enterprise Edition (64-bit) on Windows NT 6.0 <X64> (Build 6002: Service Pack 2) (VM).
Any help would be appreciated. Thanks!