Skip to content

Latest commit

 

History

History
128 lines (96 loc) · 6.21 KB

revoke-endpoint-permissions-transact-sql.md

File metadata and controls

128 lines (96 loc) · 6.21 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic helpviewer_keywords dev_langs
REVOKE Endpoint Permissions (Transact-SQL)
REVOKE Endpoint Permissions (Transact-SQL)
VanMSFT
vanto
08/10/2017
sql
t-sql
reference
endpoints [SQL Server], permissions
REVOKE statement, endpoints
permissions [SQL Server], endpoints
TSQL

REVOKE Endpoint Permissions (Transact-SQL)

[!INCLUDE SQL Server]

Revokes permissions granted or denied on an endpoint.

:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: Transact-SQL syntax conventions

Syntax

REVOKE [ GRANT OPTION FOR ] permission [ ,...n ]   
    ON ENDPOINT :: endpoint_name  
    { FROM | TO } <server_principal> [ ,...n ]  
    [ CASCADE ]  
    [ AS SQL_Server_login ]   
  
<server_principal> ::=   
        SQL_Server_login  
    | SQL_Server_login_from_Windows_login   
    | SQL_Server_login_from_certificate   
    | SQL_Server_login_from_AsymKey  

[!INCLUDEsql-server-tsql-previous-offline-documentation]

Arguments

permission
Specifies a permission that can be granted on an endpoint. For a list of the permissions, see the Remarks section later in this topic.

ON ENDPOINT ::endpoint_name
Specifies the endpoint on which the permission is being granted. The scope qualifier (::) is required.

{ FROM | TO } <server_principal> Specifies the [!INCLUDEssNoVersion] login from which the permission is being revoked.

SQL_Server_login
Specifies the name of a [!INCLUDEssNoVersion] login.

SQL_Server_login_from_Windows_login
Specifies the name of a [!INCLUDEssNoVersion] login created from a Windows login.

SQL_Server_login_from_certificate
Specifies the name of a [!INCLUDEssNoVersion] login mapped to a certificate.

SQL_Server_login_from_AsymKey
Specifies the name of a [!INCLUDEssNoVersion] login mapped to an asymmetric key.

GRANT OPTION
Indicates that the right to grant the specified permission to other principals will be revoked. The permission itself will not be revoked.

Important

If the principal has the specified permission without the GRANT option, the permission itself will be revoked.

CASCADE
Indicates that the permission being revoked is also revoked from other principals to which it has been granted or denied by this principal.

Caution

A cascaded revocation of a permission granted WITH GRANT OPTION will revoke both GRANT and DENY of that permission.

AS SQL_Server_login
Specifies the [!INCLUDEssNoVersion] login from which the principal executing this query derives its right to revoke the permission.

Remarks

Permissions at the server scope can be revoked only when the current database is master.

Information about endpoints is visible in the sys.endpoints catalog view. Information about server permissions is visible in the sys.server_permissions catalog view, and information about server principals is visible in the sys.server_principals catalog view.

An endpoint is a server-level securable. The most specific and limited permissions that can be revoked on an endpoint are listed in the following table, together with the more general permissions that include them by implication.

Endpoint permission Implied by endpoint permission Implied by server permission
ALTER CONTROL ALTER ANY ENDPOINT
CONNECT CONTROL CONTROL SERVER
CONTROL CONTROL CONTROL SERVER
TAKE OWNERSHIP CONTROL CONTROL SERVER
VIEW DEFINITION CONTROL VIEW ANY DEFINITION

Permissions

Requires CONTROL permission on the endpoint or ALTER ANY ENDPOINT permission on the server.

Examples

A. Revoking VIEW DEFINITION permission on an endpoint

The following example revokes VIEW DEFINITION permission on the endpoint Mirror7 from the [!INCLUDEssNoVersion] login ZArifin.

USE master;  
REVOKE VIEW DEFINITION ON ENDPOINT::Mirror7 FROM ZArifin;  
GO  

B. Revoking TAKE OWNERSHIP permission with the CASCADE option

The following example revokes TAKE OWNERSHIP permission on the endpoint Shipping83 from the [!INCLUDEssNoVersion] user PKomosinski and from all principals to which PKomosinski granted TAKE OWNERSHIP on Shipping83.

USE master;  
REVOKE TAKE OWNERSHIP ON ENDPOINT::Shipping83 FROM PKomosinski   
    CASCADE;  
GO  

See Also

GRANT Endpoint Permissions (Transact-SQL)
DENY Endpoint Permissions (Transact-SQL)
CREATE ENDPOINT (Transact-SQL)
Endpoints Catalog Views (Transact-SQL)
sys.endpoints (Transact-SQL)
Permissions (Database Engine)
Principals (Database Engine)