Skip to content

Latest commit

 

History

History
70 lines (49 loc) · 2.11 KB

File metadata and controls

70 lines (49 loc) · 2.11 KB
title sp_revoke_publication_access (Transact-SQL)
description sp_revoke_publication_access removes the login from a publications access list.
author VanMSFT
ms.author vanto
ms.reviewer randolphwest
ms.date 06/23/2025
ms.service sql
ms.subservice replication
ms.topic reference
f1_keywords
sp_revoke_publication_access_TSQL
sp_revoke_publication_access
helpviewer_keywords
sp_revoke_publication_access
dev_langs
TSQL

sp_revoke_publication_access (Transact-SQL)

[!INCLUDE SQL Server]

Removes the login from a publications access list. This stored procedure is executed at the Publisher on the publication database.

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

Syntax

sp_revoke_publication_access
    [ @publication = ] N'publication'
    , [ @login = ] N'login'
    [ , [ @publisher = ] N'publisher' ]
[ ; ]

Arguments

[ @publication = ] N'publication'

The name of the publication to access. @publication is sysname, with no default.

[ @login = ] N'login'

The login ID. @login is sysname, with no default.

[ @publisher = ] N'publisher'

[!INCLUDE ssinternalonly-md]

Return code values

0 (success) or 1 (failure).

Remarks

sp_revoke_publication_access is used in snapshot, transactional, and merge replication.

sp_revoke_publication_access can be called repeatedly.

Permissions

Only members of the sysadmin fixed server role or the db_owner fixed database role can execute sp_revoke_publication_access.

Related content