T-SQL DENY EXECUTE
what is the t-sql command/syntax to deny execute permissions to EVERYONE except the dbo on stored procedures? I want to grant execute to roles and users will then inherit rights based on the roles they belong to. as such i want new users to be denied execute on all the stored procedures i create.
thanks
sorry - i should mention i did this for a database already. i'm trying to 开发者_StackOverflow社区create the db again but seem to have forgotten the code on how i did it.
i thought it was sonmethign like "deny execute to all"?
If you explicitly deny them permissions to these objects, adding them to a role which can execute them will not work - DENY has precedence. By default no user has permissions to execute a stored procedure - the permission must be explicitly granted to either the user or the role they belong to. Do you really need more than just the default?
精彩评论