|
|
|
Valued Member
      
Group: General Forum Members
Last Login: Thursday, January 10, 2013 2:20 PM
Points: 60,
Visits: 223
|
|
Hello everyone,
Little stumped with this problem trying to do a bulk insert into a table and it was working fine for a while and suddenly started giving this:
Cannot bulk load because the file 'file.txt' could not be opened. Operating system error code 5(Access is denied.)
I checked the SQL Service account to have permissions to this file.
With some testings, I found that if I run the bulk stmt. as a "sa" user, it works ok, however, when I run it as a windows domain user(which has all the permissions on the file), it fails with the error.
Any ideas why it this is so?
Thanks
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Today @ 7:22 AM
Points: 6,693,
Visits: 11,707
|
|
See the section on Permissions in the BOL article for BULK INSERT:
http://msdn.microsoft.com/en-us/library/ms188365.aspx
__________________________________________________________________________________________________ There are no special teachers of virtue, because virtue is taught by the whole community. --Plato
Believe you can and you're halfway there. --Theodore Roosevelt
Everything Should Be Made as Simple as Possible, But Not Simpler --Albert Einstein
The significant problems we face cannot be solved at the same level of thinking we were at when we created them. --Albert Einstein
1 apple is not exactly 1/8 of 8 apples. Because there are no absolutely identical apples. --Giordy
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Wednesday, April 24, 2013 10:26 AM
Points: 23,
Visits: 187
|
|
in addition to setting up delegation, I disabled the named pipe protocol on SQL server and it works perfectly
|
|
|
|
|
Valued Member
      
Group: General Forum Members
Last Login: Today @ 5:57 AM
Points: 65,
Visits: 201
|
|
mymail.default (2/17/2011)
I checked the SQL Service account to have permissions to this file.
Check if the SQL Server Agent service account has access to this file (and location).
|
|
|
|