Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Wednesday, March 7, 2018 1:57 PM
Hi All,
Am getting below error when i run xp_delete_file() old SQL back up files.
SQL Agent and SQL Service account both have permissions to the target folder.
Msg 22049, Level 16, State 1, Line 1
xp_delete_file() returned error 2, 'The system cannot find the file specified.'
please assist.
Lesibana Chokoe
Thursday, March 8, 2018 2:08 AM
Hi Lesibana Chokoe,
>>SQL Agent and SQL Service account both have permissions to the target folder.
According to your description "both have permission", which permission did you have? It requires Full control when deleting a file, listing a folder.
Besides, have you checked if this file existing in that folder? Please also check the Windows Event log to get more information.
Best Regards,
Teige
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
Tuesday, April 10, 2018 7:08 AM
From the description of error it looks like the file you are trying to delete doesn’t exist in the location
Hope this helps ! Please Mark This As Answer if it solved your issue. Please Vote This As Helpful if it helps to solve your issue