The DisableMergeSubscription method removes the record of a Subscriber-initiated (pull) subscription from the merge publication Publisher and Distributor.
object.DisableMergeSubscription( Subscriber, SubscriptionDatabase,
Publication )
object
Expression that evaluates to an object in the Applies To list
Subscriber
String that specifies an existing Subscriber by name
SubscriptionDatabase
String that specifies the subscribed database by name
Publication
String that specifies an existing merge replication publication by name
HRESULT DisableMergeSubscription(
SQLDMO_LPCSTR Subscriber,
SQLDMO_LPCSTR SubscriptionDatabase,
SQLDMO_LPCSTR Publication);
Removing a pull subscription by using SQL-DMO is a two-step process. The application must remove the subscription at the Subscriber, then, separately remove the record of the subscription at the Publisher and Distributor.
To remove a pull subscription to a merge replication publication