sp_subscription_cleanup (T-SQL)

Removes metadata when a subscription is dropped at a Subscriber. For a normal subscription, the metadata includes an entry in the system table MSreplication_subscriptions. For a synchronizing transaction subscription, it also includes immediate-updating triggers.

Syntax

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

Arguments
[@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 a default of NULL.
Return Code Values

0 (success) or 1 (failure)

Remarks

sp_subscription_cleanup is used in all types of replication.

Permissions

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

See Also
sp_expired_subscription_cleanup System Stored Procedures
sp_mergesubscription_cleanup  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.