Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

SQL Server 2005 Permissions Question - I think

Posted on 2010-09-08
5
Medium Priority
?
225 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
5 Comments
 
LVL 17

Assisted Solution

by:Chris Mangus
Chris Mangus earned 750 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 750 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

There are some very powerful Dynamic Management Views (DMV's) introduced with SQL 2005. The two in particular that we are going to discuss are sys.dm_db_index_usage_stats and sys.dm_db_index_operational_stats.   Recently, I was involved in a di…
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…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…

916 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