Skip to content

Latest commit

 

History

History
79 lines (53 loc) · 2.79 KB

sp-reinitpullsubscription-transact-sql.md

File metadata and controls

79 lines (53 loc) · 2.79 KB
title description author ms.author ms.reviewer ms.date ms.service ms.subservice ms.topic f1_keywords helpviewer_keywords dev_langs
sp_reinitpullsubscription (Transact-SQL)
sp_reinitpullsubscription marks a transactional pull or anonymous subscription for reinitialization the next time the Distribution Agent runs.
markingmyname
maghan
randolphwest
08/22/2024
sql
replication
reference
sp_reinitpullsubscription_TSQL
sp_reinitpullsubscription
sp_reinitpullsubscription
TSQL

sp_reinitpullsubscription (Transact-SQL)

[!INCLUDE SQL Server SQL MI]

Marks a transactional pull or anonymous subscription for reinitialization the next time the Distribution Agent runs. This stored procedure is executed at the Subscriber on the pull subscription database.

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

Syntax

sp_reinitpullsubscription
    [ @publisher = ] N'publisher'
    [ , [ @publisher_db = ] N'publisher_db' ]
    [ , [ @publication = ] N'publication' ]
[ ; ]

Arguments

[ @publisher = ] N'publisher'

The name of the Publisher. @publisher is sysname, with no default.

[ @publisher_db = ] N'publisher_db'

The name of the Publisher database. @publisher_db is sysname, with a default of NULL.

[ @publication = ] N'publication'

The name of the publication. @publication is sysname, with a default of all, which marks all subscriptions for reinitialization.

Return code values

0 (success) or 1 (failure).

Remarks

sp_reinitpullsubscription is used in transactional replication.

sp_reinitpullsubscription isn't supported for peer-to-peer transactional replication.

sp_reinitpullsubscription can be called from the Subscriber to reinitialize the subscription, during the next run of the Distribution Agent.

Subscriptions to publications created with a value of false for @immediate_sync can't be reinitialized from the Subscriber.

You can reinitialize a pull subscription by either executing sp_reinitpullsubscription at the Subscriber or sp_reinitsubscription at the Publisher.

Examples

:::code language="sql" source="../replication/codesnippet/tsql/sp-reinitpullsubscriptio_1.sql":::

Permissions

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

Related content