Re: Problem with bulk load security.
- From: Erland Sommarskog <esquel@xxxxxxxxxxxxx>
- Date: Mon, 02 Feb 2009 14:57:28 -0800
(rbielaws@xxxxxxxxx) writes:
Thanks for pointing me to that 'trustworthy' setting.
Unfortunately it only changed the error I'm getting.
It fixed the error saying I don't have bulk load access but didn't
provide access. It just switched to the error saying the file can't
be opened. On the app server I see the SQL Server trying to get in as
anonymous -- similar to when I use Windows authentication.
So it seems that setting a function to 'execute as' some other user
(even with the trustworthy option on) doesn't give that function
entirely the same abilities as executing the function while actually
logged on as that same user.
It seems our only choice is to hard-code passwords to an SQL Server
account. Very dissappointing.
I think it's too early to give up. Try this:
EXECUTE AS LOGIN = '<service account>'
go
BULK INSERT ....
go
REVERT
If this works, go back read my previous post about using EXECUTE AS
LOGIN as a statement in the stored procedure and signing it with a
procedure.
It is quite obvious why it did not help to set the database to TRUSTWORTHY:
you are only impersonating a *database user*. To be able to do this,
you need to impersonate a *server login*. I don't know for sure whether
that is a sufficient condition, but it's definitely required.
--
Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx
Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
.
- Follow-Ups:
- Re: Problem with bulk load security.
- From: rbielaws
- Re: Problem with bulk load security.
- References:
- Re: Problem with bulk load security.
- From: rbielaws
- Re: Problem with bulk load security.
- Prev by Date: Re: Problem with bulk load security.
- Next by Date: Where is the connection attempt coming from?
- Previous by thread: Re: Problem with bulk load security.
- Next by thread: Re: Problem with bulk load security.
- Index(es):
Relevant Pages
|