Execution Context and the EXECUTE AS Clause

Normally, stored procedures execute within the security context of the current user. The user must have execute permission on the procedure. By default, permissions on object referenced within the stored procedure default to the permissions of the user account that owns the stored procedure, which is usually the account that the procedure was created under. If the objects referenced within the stored procedure are not also owned by the ∑owner of the stored procedure, the current user must also have the necessary permissions granted on the referenced objects. The current user does not inherit the permissions of the procedure owner. The only exception to this occurs when the objects referenced by a stored ...

Get Microsoft® SQL Server 2012 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.