June 6, 2011 at 12:05 pm
Is there a way to grant the EXECUTE permission to a role/user for ALL stored procedures under a specific schema without granting them to each individually as they are created? I want to grant the permissions for the application user for all existing stored procedures and any NEW ones that are created in the future as in enhancements.
If there is a way, is it bad practice to do so?
I found this article, however there is no code under the link.
Thanks!
June 6, 2011 at 12:09 pm
for the default schema... if you leave out the specific objectname it it grants to all objects:
GRANT EXECUTE TO [YourRoleName]
i think for a specific, non-default schema, say QA schema i think you might be right, that you have to grant by object...lemme test and confirm.
Lowell
June 6, 2011 at 12:18 pm
GRANT EXECUTE ON schema::<schema name> TO <user name>
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
June 6, 2011 at 12:21 pm
doh Gail beat me to it..i found the example in my snippets:
GRANT EXECUTE ON Schema::schemaname TO <RoleName>
Lowell
June 6, 2011 at 12:38 pm
Thank you, Lowell & Gila!! 😀
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply