I have a db with more than 1000s of stored procedures. Need a query to find the list of stored procedures which has public execute permission.
Query I tried which didn't give me clear output.
select name,
has_perms_by_name(name, 'OBJECT', 'EXECUTE') as has_execute,
has_perms_by_name(name, 'OBJECT', 'VIEW DEFINITION') as has_view_definition
from sys.procedures