Cannot bulk load because the file could not be ope

2019-03-23 02:21发布

I'm trying to set up a Stored Procedure as a SQL Server Agent Job and it's giving me the following error,

Cannot bulk load because the file "P:\file.csv" could not be opened. Operating system error code 3(failed to retrieve text for this error. Reason: 15105). [SQLSTATE 42000] (Error 4861)

Funny thing is the Stored Procedure works just fine when I execute it manually.

The drive P: is a shared drive on Windows SQL Server from LINUX via Samba Share and it was set up by executing the following command,

EXEC xp_cmdshell 'net use P: "\lnxusanfsd01\Data" Password /user:username /Persistent:Yes'

Any help on this would be highly appreciated

7条回答
孤傲高冷的网名
2楼-- · 2019-03-23 02:53

I would suggest the P: drive is not mapped for the account that sql server has started as.

查看更多
登录 后发表回答