April 24, 2009 at 2:56 am
Hi All,
I still think its a bit of a myth as to why users using windows authentication cant use bulk isnert to import data, both the user and the sql service account both have access to the share.
A way around this is to write a Proc, use the execute as owner or execute as a login, and incoporate BCP import code into the proc.
2 problems here, users with SA right cant run the proc when it has execute as owner, but its works fine with non SA users, what could be the problem here ?
I still cant get Bulk insert working with windows authentication, but works fine with sql authentication, I have used set SPN to enable delegation for the service account, still no luck.
Any ideas.
April 24, 2009 at 6:05 am
Can you explain a little more clearly what you're trying to do, and the errors that you are receiving?
For a user who connects to the database through a domain account, BCP or other bulk methods are certainly possible; I do it quite regularly through this situation.
April 24, 2009 at 6:30 am
Is windows users are local admins or limited access users..
Rajesh Kasturi
April 24, 2009 at 7:15 am
Hi Guys,
Here is the problem in simple terms, I cant Bulk insert with windows authentication:
I get the error below:
Msg 4861, Level 16, State 1, Line 1
Cannot bulk load because the file "\\servershare\filename.txt" could not be opened. Operating system error code 5(error not found).
Also, I have this code:
create proc SpRunExecuteAs
with execute as owner
as
begin
exec master..xp_cmdshell 'whoami'
End
It works for non SA users, but doesnt work for SA users, why is this ?
The error is stated below
Msg 15153, Level 16, State 1, Procedure xp_cmdshell, Line 1
The xp_cmdshell proxy account information cannot be retrieved or is invalid. Verify that the '##xp_cmdshell_proxy_account##' credential exists and contains valid information.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply