다음을 통해 공유


MergePullSubscription Object

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

The MergePullSubscription object represents a Subscriber-initiated pull or anonymous subscription to a merge publication.

현재 개체를 보여 주는 SQL-DMO 개체 모델

주의

With the MergePullSubscription object, you can:

  • Add a pull subscription to a merge publication from the Subscriber.

  • Change the properties of an existing merge pull subscription.

  • Add an anonymous subscription to a merge publication from the Subscriber.

  • Change the properties of an existing merge anonymous subscription.

To create a merge pull subscription at the Subscriber

  1. Create a new MergePullSubscription object.

  2. Set the Publisher property to the name of an existing Publisher.

  3. Set the Distributor property to the name of the Distributor.

  4. Set the PublicationDB property to the name of the database (at the Publisher) where the publication is located.

  5. Set the Publication property to the name of the publication to which to subscribe.

  6. Set the SubscriberType property to SQLDMOMergeSubscriber_Global or SQLDMOMergeSubscriber_Local.

  7. Set the SecurityMode property of the DistributorSecurity object property as appropriate.

  8. If the SecurityMode property of the DistributorSecurity object property is set to SQLDMOReplSecurity_Normal, set the StandardLogin and StandardPassword properties of the DistributorSecurity object property.

  9. Set the SecurityMode property of the PublisherSecurity object property as appropriate.

  10. If the SecurityMode property of the PublisherSecurity object property is set to SQLDMOReplSecurity_Normal, set the StandardLogin and StandardPassword properties of the PublisherSecurity object property.

  11. Note that the Name property defaults to publisher**:publication_database:**publication.

  12. Add the MergePullSubscription object to the MergePullSubscriptions collection of a connected ReplicationDatabase object at the Subscriber.

  13. Get a ReplicationDatabase object that contains the publication from the ReplicationDatabases collection of the Replication object connected to the Publisher.

  14. Use the EnableMergeSubscription method of the ReplicationDatabase object that is connected to the Publisher.

To alter an existing merge pull subscription at the Subscriber

  1. Get a MergePullSubscription object from the MergePullSubscriptions collection of a connected ReplicationDatabase object at the Subscriber.

  2. Use the BeginAlter method to mark the beginning of the changes.

  3. Set the MergePullSubscription object properties to reflect the changes to the merge pull subscription.

  4. Use the DoAlter method to submit the changes to Microsoft SQL Server.

To create a merge anonymous subscription at the Subscriber

  1. Create a new MergePullSubscription object.

  2. Set the Publisher property to the name of an existing Publisher.

  3. Set the PublicationDB property to the name of the database (at the Publisher) where the publication is located.

  4. Set the Publication property to the name of the publication to which to subscribe.

  5. Set the SubscriberType property to SQLDMOMergeSubscriber_Anonymous.

  6. Set the SecurityMode property of the DistributorSecurity object property as appropriate.

  7. If the SecurityMode property of the DistributorSecurity object property is set to SQLDMOReplSecurity_Normal, set the StandardLogin and StandardPassword properties of the DistributorSecurity object property.

  8. Set the SecurityMode property of the PublisherSecurity object property as appropriate.

  9. If the SecurityMode property of the PublisherSecurity object property is set to SQLDMOReplSecurity_Normal, set the StandardLogin and StandardPassword properties of the PublisherSecurity object property.

  10. Note that the Name property defaults to publisher**:publication_database:**publication.

  11. Add the MergePullSubscription object to the MergePullSubscriptions collection of a connected ReplicationDatabase object at the Subscriber.

To alter an existing merge anonymous subscription at the Subscriber

  1. Get a MergePullSubscription object from the MergePullSubscriptions collection of a connected ReplicationDatabase object at the Subscriber.

  2. Use the BeginAlter method to mark the beginning of the changes.

  3. Set the MergePullSubscription object properties to reflect the changes to the merge pull subscription.

  4. Use the DoAlter method to submit the changes to SQL Server.

The MergePublication2 object now supports the FTP-related properties still supported by the MergePullSubscription object. Previously, if it was necessary to modify these properties, changes had to be made at each Subscriber. Now changes can be made at the Publisher.

[!참고]

The MergePullSubscription object is compatible with instances of SQL Server versions 7.0 and later. However, the MergePullSubscription2 object extends the functionality of the MergePullSubscription object for use with features that were introduced in SQL Server 2000.

참고 항목

참조