访问与SQL Server同一Linux Server上的目录访问的CSV文件
我的SQL Server在Linux服务器上运行。 Linux服务器正在运行CIF,并从包含CSV文件的Windows服务器上安装了共享。
我试图运行一个脚本,该脚本将CSV的内容插入SQL Server上的表中。
BULK INSERT autobilling..whse_ABC
FROM '//192.168.0.211/mnt/ABC/ABC.csv'
WITH
(
FORMAT='csv',
FIRSTROW=2
)
文件权限是-r-xr-xr-x
我从SSM中获得的错误消息是:
msg 4860,第16级,状态1,第1行
不能大量负载。文件“ //192.168.0.211/mnt/abc/abc.csv”不存在或您没有文件访问权限。
感谢我能得到的任何帮助...
I have SQL Server running on a linux server. The linux server is running cifs and has mounted a share from a Windows server containing a csv file.
I an trying to run a script that will bulk-insert the contents of the csv into a table on the SQL Server.
BULK INSERT autobilling..whse_ABC
FROM '//192.168.0.211/mnt/ABC/ABC.csv'
WITH
(
FORMAT='csv',
FIRSTROW=2
)
File permissions are -r-xr-xr-x
The error message I get from SSMS is:
Msg 4860, Level 16, State 1, Line 1
Cannot bulk load. The file "//192.168.0.211/mnt/ABC/ABC.csv" does not exist or you don't have file access rights.
Appreciate any help I can get...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
谢谢,你让我走上了正确的轨道。我最终从脚本中取出了服务器IP,并且错误更改为无法从Ole db提供商“ bulk”链接服务器“(null)”中获得所需的接口(“ iid_icolumnsinfo”)。然后,我添加了字段终结者和行终结器指令,并添加了导入工作。
Thanks, you got me on the right track. I ended up taking out the server IP from the script, and the error changed to Cannot obtain the required interface ("IID_IColumnsInfo") from OLE DB provider "BULK" for linked server "(null)". I then added the field terminator and row terminator instructions and the import worked.