Condividi tramite


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

  1. Create a connection to the Subscriber by using the ServerConnection class.

  2. Create an instance of the TransPullSubscription class.

  3. Set the PublicationName, DatabaseName, PublisherName, and PublicationDBName properties.

  4. Set the connection from step 1 for the ConnectionContext property.

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

  6. (Optional) To change properties, set a new value for one of the TransPullSubscription properties that can be set, and then call the CommitPropertyChanges method.

  7. (Optional) To view the new settings, call the Refresh method to reload the properties for the article.

  8. Close all connections.

To view or modify properties of a pull subscription to a merge publication

  1. Create a connection to the Subscriber by using the ServerConnection class.

  2. Create an instance of the MergePullSubscription class.

  3. Set the PublicationName, DatabaseName, PublisherName, and PublicationDBName properties.

  4. Set the connection from step 1 for the ConnectionContext property.

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

  6. (Optional) To change properties, set a new value for one of the MergePullSubscription properties that can be set, and then call the CommitPropertyChanges method.

  7. (Optional) To view the new settings, call the Refresh method to reload the properties for the article.

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

Guida in linea e informazioni

Assistenza su SQL Server 2005