|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Wednesday, June 12, 2013 3:18 PM
Points: 1,566,
Visits: 606
|
|
(1) The 'must' gives it away, you don't have to use REVERT or another EXECUTE AS statement to change your context back.
(3) If you're an sa, you can impersonate a user with Execute As User, hence #3 is wrong - a member of the sysadmin role can use database level impersonation.
(4) "Explicitly Defined" in terms of executing as a Login or User - Execute As Login gives you impersonation at the server level, i.e. all databases, Execute As User gives you impersonation at the database only level, you can't switch to another database.
This one was pretty clear-cut ...
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Friday, June 14, 2013 8:11 AM
Points: 2,472,
Visits: 719
|
|
Thanks Simon. Makes sense now.
Jamie
|
|
|
|
|
SSChampion
        
Group: General Forum Members
Last Login: Today @ 1:41 PM
Points: 10,613,
Visits: 11,952
|
|
|
|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Wednesday, June 12, 2013 3:18 PM
Points: 1,566,
Visits: 606
|
|
Talking of VB or C# - I guess 'scope' is an 'overloaded' term ... different meaning depending on circumstance.
|
|
|
|
|
Valued Member
      
Group: General Forum Members
Last Login: Tuesday, February 07, 2012 10:15 AM
Points: 60,
Visits: 34
|
|
I totally agree to that. For more info see
The change in execution context remains in effect until one of the following occurs:
1.Another EXECUTE AS statement is run. 2.A REVERT statement is run. 3.The session is dropped.
http://msdn.microsoft.com/en-us/library/ms181362.aspx
|
|
|
|
|
SSCarpal Tunnel
       
Group: General Forum Members
Last Login: Tuesday, June 11, 2013 5:01 AM
Points: 4,814,
Visits: 1,343
|
|
|
|
|
|
Valued Member
      
Group: General Forum Members
Last Login: Friday, July 30, 2010 5:17 PM
Points: 69,
Visits: 130
|
|
| Happened exactly the same to me, cause I choosed 2 & 3. Simply, I'm going to check it out on the SQL Server, and I'll see what happens with the DBO/SYSADMIN issue over the EXECUTE AS command; which as far as I can see has been the hot topic here for most of us.
|
|
|
|