撤销与拒绝:有什么区别

发布于 2024-11-03 11:59:47 字数 248 浏览 5 评论 0 原文

DENYREVOKE SQL Server 中的命令?

What is the difference between the DENY and REVOKE commands in SQL Server?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

你曾走过我的故事 2024-11-10 11:59:47

每个对象都有一个DENYGRANT访问规则列表。

REVOKE 是从访问规则列表中删除规则的操作。

Each object has a list of rules DENYing and GRANTing access.

REVOKE is an operation that removes a rule from the list of access rules.

终止放荡 2024-11-10 11:59:47

Revoke 与 Grant 相反(至少与 Grant 添加访问规则而 Revoke 删除访问规则一样),而有些违反直觉的 Deny 也添加访问规则(当然可以通过 Revoke 删除)。

如果我授予销售组访问权限,我可以稍后撤销它。

不过,我也可以拒绝您的访问权限,即使您在销售组中,您也无权访问。

Revoke is the opposite of a Grant (at least in as much as Grant adds an access rule and Revoke Removes an access Rule) While somewhat counter-intuative Deny also adds an access rule (which of course can be removed with a Revoke).

If I grant the sales group access I can later revoke it.

However I could also deny you access, and even through you're in the sales group you'll not have access.

回忆那么伤 2024-11-10 11:59:47

REVOKE 删除已GRANT 的访问权限。 DENY 明确拒绝,优先于 GRANT

最后一点,如果某人是 db_denydatawriter 角色的一部分,但您向他们授予插入权限,那么 DENY 将覆盖该角色GRANT,他们将无法INSERT

REVOKE removes access that has been GRANTed. DENY explicitly rejects, taking precedence over GRANTs.

To the last point, if someone is part of the db_denydatawriter role, but you GRANT INSERT to them, the DENY will override that GRANT and they will be unable to INSERT.

咆哮 2024-11-10 11:59:47
  1. 授予权限意味着用户可以访问该对象

  2. 拒绝权限覆盖授予的权限

  3. 撤销权限将删除已分配的权限,无论它是被拒绝的权限还是授予的权限

  1. Granting Permission means that a user can access the object

  2. Denying permission overrides a granted permission

  3. Revoking a permission removes the permission that has been assigned, regardless of whether it was a denied permission or a granted permission

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文