Solved

SQL Server 2005 Permissions Question - I think

Posted on 2010-09-08
5
217 Views
Last Modified: 2012-09-16
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  
0
Comment
Question by:Bill Ross
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 17

Assisted Solution

by:Chris Mangus
Chris Mangus earned 250 total points
ID: 33631882
Aside from share permissions did you also give the SQL service account NTFS permissions?
0
 
LVL 35

Accepted Solution

by:
David Todd earned 250 total points
ID: 33631903
0
 
LVL 5

Expert Comment

by:dbidba
ID: 33633342
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.
0
 
LVL 14

Author Comment

by:Bill Ross
ID: 33658351
Hi,

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

Thanks,

Bill
0
 
LVL 14

Author Closing Comment

by:Bill Ross
ID: 38403040
Still not resolved.  Worked around using MS Access to load into SQL.
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Pivot Query Problem 9 53
Order by but want it in specific order 2 38
Replication failure 1 32
SQL Server for XML PATH giving wrong results. 6 61
I am showing a way to read/import the excel data in table using SQL server 2005... Suppose there is an Excel file "Book1" at location "C:\temp" with column "First Name" and "Last Name". Now to import this Excel data into the table, we will use…
In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question