Cannot bulk load. The file “c:\\data.txt” does not exist

六月ゝ 毕业季﹏ 提交于 2019-11-27 09:40:15

That's run on the server, so its looking for C:\data.txt on the server's C: drive.

Also ensure the logon your using has read permissions on C:.

Is that file on the SQL Server's C:\ drive?? SQL BULK INSERT etc. always works only with local drive on the SQL Server machine. Your SQL Server cannot reach onto your own local drive.

You need to put the file onto the SQL Server's C:\ drive and try again.

Update: @bp_, ok, correct - the file can also be on a share that you can access from the SQL Server machine using an UNC path. But again: that share must be created first, and the user the SQL Server process is running under must have access permissions to that share. You cannot just simply grab a file from a local drive on your PC without setting up quite a bit of infrastructure overhead first

This is mostly permission issue. you may not have permission on that drive. Make sure the logon you are using has read or if possible full control permission. It worked for me on local machine.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!