Granting Execute Permission to All Stored Procedures
Problem
You've transferred or run a bunch of stored procedure scripts, but you can't execute them. Reason - execute permission denied. You forgot to put a grant statement in your script.
Solution
The trivial solution is, of course, GRANT EXECUTE ON {your proc name} TO PUBLIC
. Slightly less trivial is to grant to a specific role, but most
people needing this tip will only be using PUBLIC.
Wouldn't it be great to automate this for all stored procedures in the database? Well, here you go: