SQL Server 2005 sp2
Windows Server 2003
I have a scheduled stored proc that executes Bulk Insert. It works
fine. Agent runs under a domain, sys admin account. I know, I know,
too much authority.
When I run the Bulk insert command from a SSMS query window, I get this
error:
"Msg 4861, Level 16, State 1, Line 2
Cannot bulk load because the file "\\Server\\share\TextFile.txt" could
not be opened. Operating system error code 5(Access is denied.)."
I can use a text editor to open, modify and save the file I'm trying to
bulk insert, so I know I have the rights I need to read the file.
Why the error from SSMS?
thanks
Tom

Signature
E-mail correspondence to and from this address may be subject to the
North Carolina Public Records Law and may be disclosed to third parties.
Ben Nevarez - 07 Mar 2008 21:36 GMT
Are you connecting to SQL Server using a SQL Server login (not a Windows
domain login)? If that is the case, the permissions of the SQL Server service
account will be used to access the file. Give permissions to the SQL Server
service account to this file or connect to the instance using Windows
authentication.
Hope this helps,
Ben Nevarez
> SQL Server 2005 sp2
> Windows Server 2003
[quoted text clipped - 16 lines]
> thanks
> Tom
Tom W - 10 Mar 2008 12:53 GMT
Thanks Ben.
We're using Windows authentication. The same problem occurs when
another developer tries Bulk Insert with a different file on a different
server into a different database. She also can open and modify her text
file with a text editor.
I found a post on a Microsoft forum from someone who had the same
problem. He said that Microsoft said it is a bug that will be fixed in
SQL 2008.
Thanks for taking the time to respond.
Tom
>Are you connecting to SQL Server using a SQL Server login (not a Windows
>domain login)? If that is the case, the permissions of the SQL Server service
[quoted text clipped - 28 lines]
>>thanks
>>Tom

Signature
E-mail correspondence to and from this address may be subject to the
North Carolina Public Records Law and may be disclosed to third parties.