Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 BULK INSERT command not working

Author  Topic 

funk.phenomena
Posting Yak Master

121 Posts

Posted - 2012-03-19 : 16:41:39
Hi All - I'm currently using SSMS 2008. I currently have a process in which the BULK INSERT command is performed on a file that's stored on the a drive located on the same server I'm logged into. This works without any issues:

[CODE]
BULK INSERT MyDataTable.csv

FROM 'D:\DATA_FILES\ MyDataTable.csv'

WITH ( FIELDTERMINATOR = ';', ROWTERMINATOR = '\n')

END
[/CODE]

I've been trying to change this process so that the file gets uploaded from my local hard drive so I don't always have to copy it to the server:[CODE]

BULK INSERT MyDataTable.csv

FROM '\\DESKTOP0593\SHARED\MyDataTable.csv'

WITH ( FIELDTERMINATOR = ';', ROWTERMINATOR = '\n')

END
[/CODE]

The file is located on a folder that's shared to everyone (I've confirmed this 100%). When I try the above code, I keep getting the [CODE]"SQL BULK COPY ERROR (“Operating system error code 5(Access is denied.)”)"[/CODE]

Again, I've confirmed that the path is valid, and shared to EVERYONE on the network. Any ideas? THANKS!

Grifter
Constraint Violating Yak Guru

274 Posts

Posted - 2012-03-19 : 17:34:28
this may help:

http://blogs.msdn.com/b/dataaccesstechnologies/archive/2010/10/29/sql-bulk-copy-error-operating-system-error-code-5-access-is-denied.aspx

Scroll down to

quote:
iv)The SQL Server service account must be trusted for delegation.
Go to Top of Page
   

- Advertisement -