Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I get this error:

Executing the query "EXECUTE master.dbo.xp_delete_file 0,N'\\SQLSvr..." failed with the following error: "xp_delete_file() returned error 2, 'The system cannot find the file specified.'". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.

The server is running SQL Server 2008 R2 doing backups on one server to save to a remote server using UNC paths; file extension is ".bak".

share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

Much as the error message states, it can't find the file N'\\SQLSvr..."

If you know the file does exist, then that usually points to a permission problem with either the account SQL Agent is executing as or if you've created it, a credentials proxy account. Either way, it can't access the network share or it does not have permission to perform the delete operation.

I'd first verify the account can access the share, then look at folder permissions and ensure it has delete privilege.

share|improve this answer
    
you're right. thanks. what threw me off was the fact that since it backups up to a different server using the same account i had set it up with, it should have been able to cleanup too using those same credentials. anyways on the share and the ntfs, i added the server/computer(destination) itself to the security permissions with full control and that did it. thanks again! –  shilezi Oct 22 '13 at 13:20
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.