Grant Execute Permissions for all sprocs on SQL 2005


So I did a post for SQL 2000 aaages ago showing how to do this- it’s a lot easier in SQL 2005 but i always forget the syntax as i rarly have to use it.

Open a new query editor on your selected database server then run this;

use <database_name>;
/* CREATE A NEW ROLE */
CREATE ROLE db_executor

/* GRANT EXECUTE TO THE ROLE */
GRANT EXECUTE TO db_executor

Then right click your database user (under security for the given database) and tick the new db_executor role. You’re done!

Related posts:

  1. #1 by Paul on August 24, 2010 - 16:53

    Thats very swish

  2. #2 by shawson on August 25, 2010 - 11:05

    thought you’de like that one! :P

(will not be published)