Skip to content

Latest commit

 

History

History
82 lines (58 loc) · 2.66 KB

sp-dropsubscriber-transact-sql.md

File metadata and controls

82 lines (58 loc) · 2.66 KB
title description author ms.author ms.reviewer ms.date ms.service ms.subservice ms.topic f1_keywords helpviewer_keywords dev_langs
sp_dropsubscriber (Transact-SQL)
sp_dropsubscriber removes the Subscriber designation from a registered server.
markingmyname
maghan
randolphwest
11/28/2023
sql
replication
reference
sp_dropsubscriber_TSQL
sp_dropsubscriber
sp_dropsubscriber
TSQL

sp_dropsubscriber (Transact-SQL)

[!INCLUDE SQL Server SQL MI]

Removes the Subscriber designation from a registered server. This stored procedure is executed at the Publisher on the publication database.

Important

This stored procedure has been deprecated. You're no longer required to explicitly register a Subscriber at the Publisher.

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

Syntax

sp_dropsubscriber
    [ @subscriber = ] N'subscriber'
    [ , [ @reserved = ] N'reserved' ]
    [ , [ @ignore_distributor = ] ignore_distributor ]
    [ , [ @publisher = ] N'publisher' ]
[ ; ]

Arguments

[ @subscriber = ] N'subscriber'

The name of the Subscriber to be dropped. @subscriber is sysname, with no default.

[ @reserved = ] N'reserved'

[!INCLUDE ssinternalonly-md]

[ @ignore_distributor = ] ignore_distributor

[!INCLUDE ssinternalonly-md]

[ @publisher = ] N'publisher'

[!INCLUDE ssinternalonly-md]

Return code values

0 (success) or 1 (failure).

Remarks

sp_dropsubscriber is used in all types of replication.

This stored procedure removes the server sub option, and removes the remote login mapping of system administrator to repl_subscriber.

Permissions

Only members of the sysadmin fixed server role can execute sp_dropsubscriber.

Related content