Avatar of Bill Ross
Bill Ross
Flag for United States of America asked on

SQL Server 2005 Permissions Question - I think

Hi,

I have the following SQL statement that returns the error shown.

BULK INSERT dbo.tablename FROM '\\server\xxx\filename' WITH (FIELDTERMINATOR = '|', ROWTERMINATOR = '');

Error message...
msg 4861, Level 16, State 1, Line 1
Cannot bulk load because the file '\\server\xxx\filename' could not be opened. Operating system error code 5(Access is denied.).

I have added the SQL Service account as a user on the share and can see the file using that account.

Any ideas would be greatly appreciated!

Thanks,

Bill  
Microsoft SQL Server 2005

Avatar of undefined
Last Comment
Bill Ross

8/22/2022 - Mon
SOLUTION
Chris Mangus

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
ASKER CERTIFIED SOLUTION
David Todd

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
dbidba

To narrow down where the error is occurring, I recommend that you copy the file to the machine hosting the SQL Server instance and then test the bulk insert. As described above, it must be a folder to which which your account or the service account has access. If it works on a local file, but not a remote file, you may be hitting a double hop issue.
Bill Ross

ASKER
Hi,

Just to follow up - still waiting on SQL admin to make the changes to see if that corrects the issue.

Thanks,

Bill
Bill Ross

ASKER
Still not resolved.  Worked around using MS Access to load into SQL.
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck