Script out all stored procedures with permissions?
Hi all, I want to do an audit of all our stored procs on one of our dbs and what the permissions are to execute... i can't seem to find anything on the net... how do i do this? i've tried looking at sys.procedures, sys.database_principals and sys.syspermissions but there doesn't seem to be a key i can join on... any ideas? Thanks!
Permissions are stored in [`sys.database_permissions`]. Not only can you have execute permission directly on the stored proc, you can also have execute permission on a schema, thereby giving you permissions on all contained objects, and also execute permission at the database level. :