3

Description: Cannot open the datafile "Z:\Folder\File.txt". End Error
Error Code: 0xC004701A

4
  • 1
    Have you tried specifying the full UNC path instead of the Z: drive? How are you trying to access this file? SSIS, Stored Proc?
    – SS_DBA
    Aug 23, 2016 at 14:04
  • Also, what version?
    – Tom V
    Aug 23, 2016 at 14:17
  • 1
    It really depends on if Z:\ is local or a network share.
    – Jason B.
    Aug 23, 2016 at 15:22
  • Question needs more details, instance version, network path,service account username, proxy or not. Aug 25, 2016 at 8:14

3 Answers 3

6

Under Windows Administrative Tools and Services, find the login account for the Sql Server Agent and grant that login the appropriate rights to the folder(s)/File(s)

You can also find the login account for the Sql Server Agent by using the sql Server Configuation Manager and clicking on the Sql Server Services node.

3

Scott Hodgin is correct. You should award him the answer.
In addition, if you do not want to grant the SQL Agent Login rights on your network, you can alternately run using a Proxy account with stored credentials.
Then you can apply that proxy to the Job step and have it run with those credentials instead of the SQL Agent login account.
Of course you will still have to grant permissions to the folder to that account.

2

If Z: is a file share you will need to grant NTFS security and file share permissions. I've missed file share permission before and it drove me crazy for far too long.

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