访问与SQL Server同一Linux Server上的目录访问的CSV文件

发布于 2025-01-24 02:47:42 字数 444 浏览 0 评论 0原文

我的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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

温柔戏命师 2025-01-31 02:47:42

谢谢,你让我走上了正确的轨道。我最终从脚本中取出了服务器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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文