Re: Problem with bulk load security.
- From: rbielaws@xxxxxxxxx
- Date: Thu, 29 Jan 2009 18:51:27 -0800 (PST)
On Jan 29, 5:14 pm, Erland Sommarskog <esq...@xxxxxxxxxxxxx> wrote:
(rbiel...@xxxxxxxxx) writes:
I guess I'm confused.
The only user that didn't have the bulkadmin roll was the ID that SQL
Server itself runs under.
That one wasn't even in the ACL anywhere.
So I assumed that was the 'service account' you were talking about.
But after adding the login and giving it bulkadmin nothing changed.
I still get "You do not have permission to use the bulk load
statement."
On one level I thought it made sense but since it didn't work I'm not
completely sure I understood what you wanted me to try.
You said that you did EXECUTE AS. Did you to EXECUTE AS USER or EXECUTE
AS LOGIN? You need to do the latter, or else you will be sandboxed into
the current database and can't do things outside it, unless the database
is marked as trustworthy.
--
Erland Sommarskog, SQL Server MVP, esq...@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
I think that describes what I did.
I logged in with the ID that worked.
Then I defined the procedure using 'with execute as self'.
Which should be the same as 'with execute as <working ID>'
It's the only ID that seemed to have any hope of working.
As for user vs login, I don't see a syntax difference.
I only see this which indicates 'user_name' is my only option.
DDL Triggers with Server Scope and logon triggers
{ EXEC | EXECUTE } AS { CALLER | SELF | 'login_name' }
' login_name '
Specifies the statements inside the module execute in the context of
the SQL Server login specified in login_name. Permissions for any
objects within the module are verified against login_name. login_name
can be specified only for DDL triggers with server scope or logon
triggers.
Functions (except inline table-valued functions), Stored Procedures,
and DML Triggers
{ EXEC | EXECUTE } AS { CALLER | SELF | OWNER | 'user_name' }
' user_name '
Specifies the statements inside the module execute in the context of
the user specified in user_name. Permissions for any objects within
the module are verified against user_name. user_name cannot be
specified for DDL triggers with server scope or logon triggers. Use
login_name instead.
.
- Follow-Ups:
- Re: Problem with bulk load security.
- From: Erland Sommarskog
- Re: Problem with bulk load security.
- References:
- Problem with bulk load security.
- From: RickB
- Re: Problem with bulk load security.
- From: Erland Sommarskog
- Re: Problem with bulk load security.
- From: rbielaws
- Re: Problem with bulk load security.
- From: Erland Sommarskog
- Problem with bulk load security.
- Prev by Date: Re: Problem with bulk load security.
- Next by Date: Re: MapSids.exe Download File
- Previous by thread: Re: Problem with bulk load security.
- Next by thread: Re: Problem with bulk load security.
- Index(es):
Relevant Pages
|