We have a database maintenance plan set to do a full backup of all user databases nightly. The backups are set to expire after seven days and they are backed up to disk with the file extension "bak".
Problem is that the job is not deleting any backup sets older than seven days (same goes for the job that backs up the transaction log).
All the databases being backed up have their recovery models set to "Full".
SQL Server Agent is logging on as Local System and "SYSTEM" has full rights to the folders where these backups are bieng saved.
The jobs are not reporting any errors when they are manually run and there are no errors in the log files.
If I create a test maintenance plan to delete text files in a directory and run the generated T-SQL, the command completes successfully but the text file in the directory does not get removed.
EXECUTE master.dbo.xp_delete_file 0,N'D:\TEST',N'.txt'
I know it's a rights issue but everything looks okay on our end.
Anyone have any ideas?