I am creating this blog mostly for me, so that I have references of things I use a lot and just a place to write down any random thoughts I want to. If you've stumbled across this and enjoy it, that's great. If not, that's just as well too.
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