The Execution Context

The execution context determines what permissions are checked when statements are executed or actions are performed on the database server. By default, the execution context is set to the principal connected to the server or database. If a user named Chris connects to the AdventureWorks2008 database, the permissions assigned to Chris are checked.

In SQL Server 2008, you can change the execution context so that permissions are checked for a principal other than that to which you are connected. You can make this change in execution context (called context switching) explicitly or implicitly.

Get Microsoft® SQL Server 2008 R2 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.