Share via


DisableMergeSubscription Method

Microsoft SQL Server의 이후 버전에서는 이 기능이 제거됩니다. 새 개발 작업에서는 이 기능을 사용하지 말고, 현재 이 기능을 사용하는 응용 프로그램은 수정하십시오.

The DisableMergeSubscription method removes the record of a Subscriber-initiated (pull) subscription from the merge publication Publisher and Distributor.

구문


            object
.DisableMergeSubscription(
Subscriber
,
SubscriptionDatabase
,
Publication
)
        

Parts

  • 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.

Prototype (C/C++)

HRESULT DisableMergeSubscription(
SQLDMO_LPCSTR Subscriber,
SQLDMO_LPCSTR SubscriptionDatabase,
SQLDMO_LPCSTR Publication);

주의

Removing a pull subscription by using SQL Distributed Management Objects (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

  1. Establish SQLServer object connection to the Subscriber.

  2. Extract the MergePullSubscription object referencing the subscription from the Subscriber MergePullSubscriptions collection.

  3. Use the Remove method of the MergePullSubscription object.

  4. Establish a SQLServer object connection to the Publisher.

  5. Use the DisableMergeSubscription method of the ReplicationDatabase object referencing the published database.

Applies To:

ReplicationDatabase Object