开发者

T-SQL DENY EXECUTE

开发者 https://www.devze.com 2022-12-11 09:32 出处:网络
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 the

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?

0

精彩评论

暂无评论...
验证码 换一张
取 消