November 8, 2006 at 1:35 pm
I have a curious situation. I issue a bulk insert command and in one case I site a shared drive on server A and it works. Then I issue the same command citing a shared drive on server B and it doesn't work. Does this necesarrily mean a rights issue on the directory?
Server: Msg 4861, Level 16, State 1, Line 1
Could not bulk insert because file '\\server\dir\file.dat' could not be opened. Operating system error code 5(Access is denied.).
The permission appear to be equal!
SQL 2012 Standard VPS Windows 2012 Server Standard
November 9, 2006 at 4:36 am
I had a problem. The directory had the $ sign on it for sharing.
November 9, 2006 at 7:31 am
When using UNC names, the format is \\server\sharename\...
Make sure to check permissions on both the folder and the share on server B.
November 9, 2006 at 11:25 am
This is a permissions issue. I can read the file from both servers if I add the 'everyone' group to the permissions. But I cont and wont do that.
Does anyone know if there is a utility member of the everyone group I can add to the network share?
SQL server agent is running under a local account.
The bulk insert is executed by admin.
I can only bulk insert if the netshare gives permissions to the everyone group.
SQL 2012 Standard VPS Windows 2012 Server Standard
November 9, 2006 at 1:54 pm
how are you executing the BCP command? Is it via a SQL Agent job, via xp_cmdshell or whatnot? Try adding the SQL Agent account to the share permissions. Also have a look at the SQL server proxy account in BOL as addign that to the share permissions may work as well.
-Luke.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply