Execution Context and the EXECUTE AS Clause

In order to execute a stored procedure created by another user, the user executing the procedure must be granted execute permission on the procedure. By default, however, permissions on objects referenced within the stored procedure are not automatically inherited from the procedure owner if the objects referenced within the stored procedure are not also owned by the creator of the stored procedure. The current user executing the procedure must also have the necessary permissions granted on the referenced objects in order to successfully execute the procedure. The only exception to this occurs when the objects referenced by a stored procedure are also owned by the same user who owns the stored procedure. ...

Get Microsoft SQL Server 2014 Unleashed now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.