MergePullSubscription Object (SQL-DMO)
The MergePullSubscription object represents a Subscriber-initiated pull or anonymous subscription to a merge publication.
Remarks
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
- Create a new MergePullSubscription object.
- Set the Publisher property to the name of an existing Publisher.
- Set the PublicationDB property to the name of the database (at the Publisher) where the publication is located.
- Set the Publication property to the name of the publication to which to subscribe.
- Set the SubscriberType property to SQLDMOMergeSubscriber_Global or SQLDMOMergeSubscriber_Local.
- Set the SecurityMode property of the DistributorSecurity object property as appropriate.
- 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.
- Set the SecurityMode property of the PublisherSecurity object property as appropriate.
- 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.
- Note that the Name property defaults to publisher:publication_database:publication.
- Add the MergePullSubscription object to the MergePullSubscriptions collection of a connected ReplicationDatabase object at the Subscriber.
- Get a ReplicationDatabase object that contains the publication from the ReplicationDatabases collection of the Replication object that is connected to the Publisher.
- Use the EnableMergeSubscription method of the ReplicationDatabase object that is connected to the Publisher.
To alter an existing merge pull subscription at the Subscriber
- Get a MergePullSubscription object from the MergePullSubscriptions collection of a connected ReplicationDatabase object at the Subscriber.
- Use the BeginAlter method to mark the beginning of the changes.
- Set the MergePullSubscription object properties to reflect the changes to the merge pull subscription.
- Use the DoAlter method to submit the changes to Microsoft® SQL Server™.
To create a merge anonymous subscription at the Subscriber
- Create a new MergePullSubscription object.
- Set the Publisher property to the name of an existing Publisher.
- Set the PublicationDB property to the name of the database (at the Publisher) where the publication is located.
- Set the Publication property to the name of the publication to which to subscribe.
- Set the SubscriberType property to SQLDMOMergeSubscriber_Anonymous.
- Set the SecurityMode property of the DistributorSecurity object property as appropriate.
- 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.
- Set the SecurityMode property of the PublisherSecurity object property as appropriate.
- 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.
- Note that the Name property defaults to publisher:publication_database:publication.
- 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
- Get a MergePullSubscription object from the MergePullSubscriptions collection of a connected ReplicationDatabase object at the Subscriber.
- Use the BeginAlter method to mark the beginning of the changes.
- Set the MergePullSubscription object properties to reflect the changes to the merge pull subscription.
- Use the DoAlter method to submit the changes to SQL Server.
Methods
Properties
(c) 1988-98 Microsoft Corporation. All Rights Reserved.