Grantor does not have GRANT permission - issue

时光毁灭记忆、已成空白 提交于 2019-12-06 15:59:59

You have two solutions for this:

1) Define the AUTHORIZATION for the role (See here)

CREATE SERVER ROLE role_name [ AUTHORIZATION server_principal ]

role_name
Is the name of the server role to be created.

AUTHORIZATION server_principal
Is the login that will own the new server role. If no login is specified, the server role will be owned by the login that executes CREATE SERVER ROLE.

The server principal will be able to grant the role.

2) Use CONTROL ON ROLE

You can add it within the list of the GRANTed permissions. Look at the Database role permissions section in this document:

From DENY server permissions:

Requires CONTROL SERVER permission or ownership of the securable. If you use the AS clause, the specified principal must own the securable on which permissions are being denied.

So, it would seem that because your server role doesn't have CONTROL SERVER, they can't deny connect themselves.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!