在 SQL Server 数据库中有:
- 2个模式:
dbo
和customized_schema
- 2 个用户:
sa
和standard_user
在架构下,[customized_schema]
有具有我的标准应用程序的自定义功能的实体。
我想要拒绝用户standard_user
使用模式customized_schema,但我想要的甚至是隐藏表、视图、函数和存储过程中的代码的结构。
我试过这个但不起作用:
DENY UPDATE ON SCHEMA::[customized_schema] TO [standard_user]
GO
DENY TAKE OWNERSHIP ON SCHEMA::[customized_schema] TO [standard_user]
GO
DENY CONTROL ON SCHEMA::[customized_schema] TO [standard_user]
GO
DENY EXECUTE ON SCHEMA::[customized_schema] TO [standard_user]
GO
DENY DELETE ON SCHEMA::[customized_schema] TO [standard_user]
GO
DENY INSERT ON SCHEMA::[customized_schema] TO [standard_user]
GO
DENY ALTER ON SCHEMA::[customized_schema] TO [standard_user]
GO
DENY REFERENCES ON SCHEMA::[customized_schema] TO [standard_user]
GO
DENY SELECT ON SCHEMA::[customized_schema] TO [standard_user]
GO
DENY VIEW DEFINITION ON SCHEMA::[customized_schema] TO [standard_user]
GO
DENY VIEW CHANGE TRACKING ON SCHEMA::[customized_schema] TO [standard_user]
GO
我想比较数据库(使用 Visual Studio 2012 SSDT)并使用 部署更改standard_user
,期望忽略客户功能。