Tuesday, October 11, 2011

Grant Execute Access to all Stored Procs

When setting up a new user for a .NET website, the user often needs execute rights on stored procedures.  The easiest way to do this is the following SQL command:

/* CREATE A NEW ROLE */
CREATE ROLE db_executor

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

After that, just set your new user account up to be in the "db_executor" role for the database they need execute permissions on.

No comments:

Post a Comment