bulk insert from a file on a network disk

  • 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

  • I had a problem.  The directory had the $ sign on it for sharing.

    \\server\C\myfile.txt

    \\server\C$\myfile.txt

     

  • When using UNC names, the format is \\server\sharename\...

    Make sure to check permissions on both the folder and the share on server B.

  • 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

  • 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.

    To help us help you read this[/url]For better help with performance problems please read this[/url]

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply