I am using SQL Server 2008 R2. I need to list out all the stored procedures that a database user (MYUSER) has execute permission.
Also, I need to list out which ar
Extending on the accepted answer above, in order to check objects outside of the dbo
schema, use the following statement.
SELECT
name,
HAS_PERMS_BY_NAME(QUOTENAME(SCHEMA_NAME(schema_id)) + '.' + QUOTENAME(name), 'OBJECT', 'EXECUTE') AS has_execute,
HAS_PERMS_BY_NAME(QUOTENAME(SCHEMA_NAME(schema_id)) + '.' + QUOTENAME(name), 'OBJECT', 'VIEW DEFINITION') AS has_view_definition
FROM sys.procedures