Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize

sp_mergesubscription_cleanup (Transact-SQL)

Applies To: SQL Server 2014, SQL Server 2016 Preview

Topic Status: Some information in this topic is preview and subject to change in future releases. Preview information describes new features or changes to existing features in Microsoft SQL Server 2016 Community Technology Preview 2 (CTP2).

Removes metadata, such as triggers and entries, in sysmergesubscriptions and sysmergearticles after the specified merge push subscription is removed at the Publisher. This stored procedure is run at the Subscriber on the subscription database.

Note Note

For a pull subscription, metadata is removed when sp_dropmergepullsubscription (Transact-SQL) is executed.

Topic link icon Transact-SQL Syntax Conventions

sp_mergesubscription_cleanup [ @publisher =] 'publisher' 
        , [ @publisher_db =] 'publisher_db' 
        , [ @publication =] 'publication'

[ @publisher =] 'publisher'

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

[ @publisher_db =] 'publisher_db'

Is the name of the Publisher database. publisher_db is sysname, with no default.

[ @publication =] 'publication'

Is the name of the publication. publication is sysname, with no default.

0 (success) or 1 (failure)

sp_mergesubscription_cleanup is used in merge replication.

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

Community Additions

ADD
Show:
© 2015 Microsoft