• Using a Certificate Versus Stored Procedure WITH EXECUTE AS

    Hello Jonathan, I appreciated this article. It got me wondering, what signing with a certificate gets us that SP WITH EXECUTE AS functionality does not?

    Either way we grant myCertUserName read access to the underlying tables called by the sp.

    CREATE PROCEDURE dbo.usp_Demo

    WITH EXECUTE AS 'CompanyDomain\myCertUserName'

    AS

    SELECT user_name();

    GO

    Thank you in advance for your feedback.