How to: View and Modify Pull Subscription Properties (RMO Programming)
You can modify pull subscriptions and access their properties programmatically by using Replication Management Objects (RMO). The RMO classes you use to view or modify pull subscription properties depend on the type of publication to which the pull subscription is subscribed.
To view or modify properties of a pull subscription to a snapshot or transactional publication
Create a connection to the Subscriber by using the ServerConnection class.
Create an instance of the TransPullSubscription class.
Set the PublicationName, DatabaseName, PublisherName, and PublicationDBName properties.
Set the connection from step 1 for the ConnectionContext property.
Call the LoadProperties method to get the properties of the object. If this method returns false, either the subscription properties in step 3 were defined incorrectly or the subscription does not exist on the server.
(Optional) To change properties, set a new value for one of the TransPullSubscription properties that can be set, and then call the CommitPropertyChanges method.
(Optional) To view the new settings, call the Refresh method to reload the properties for the article.
Close all connections.
To view or modify properties of a pull subscription to a merge publication
Create a connection to the Subscriber by using the ServerConnection class.
Create an instance of the MergePullSubscription class.
Set the PublicationName, DatabaseName, PublisherName, and PublicationDBName properties.
Set the connection from step 1 for the ConnectionContext property.
Call the LoadProperties method to get the properties of the object. If this method returns false, either the subscription properties in step 3 were defined incorrectly or the subscription does not exist on the server.
(Optional) To change properties, set a new value for one of the MergePullSubscription properties that can be set, and then call the CommitPropertyChanges method.
(Optional) To view the new settings, call the Refresh method to reload the properties for the article.
Close all connections.
Vedere anche
Attività
Procedura: Creazione di una sottoscrizione pull (programmazione Transact-SQL della replica)
Altre risorse
Procedura: Visualizzazione e modifica delle proprietà delle sottoscrizioni pull (SQL Server Management Studio)
Sottoscrizione delle pubblicazioni