Share via


RegisteredSubscriber Object

Questa caratteristica verrà rimossa a partire da una delle prossime versioni di Microsoft SQL Server. Evitare di utilizzare questa funzionalità in un nuovo progetto di sviluppo e prevedere interventi di modifica nelle applicazioni in cui è attualmente implementata.

The RegisteredSubscriber object represents the information a Publisher has about a Subscriber.

Modello di oggetti SQL-DMO in cui è visualizzato l'oggetto corrente

Osservazioni

With the RegisteredSubscriber object, you can:

  • Add a Subscriber at the Distributor or Publisher.

  • Change the properties of an existing Subscriber at the Distributor or Publisher.

To add a Subscriber at the Publisher

  1. Create a new RegisteredSubscriber object.

  2. Set the Name property to the server name of the Subscriber.

  3. Add the RegisteredSubscriber object to the RegisteredSubscribers collection of a connected Publisher object.

To add a Subscriber at the Distributor

  1. Create a new RegisteredSubscriber object.

  2. Set the Name property to the server name of the Subscriber.

  3. Add the RegisteredSubscriber object to the RegisteredSubscribers collection of a connected DistributionPublishers object.

To alter an existing Subscriber at the Publisher

  1. Get a RegisteredSubscriber object from the RegisteredSubscribers collection of a connected Publisher object.

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

  3. Set the RegisteredSubscriber object properties to reflect the changes to the Subscriber.

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

To alter an existing Subscriber at the Distributor

  1. Get a RegisteredSubscriber object from the RegisteredSubscribers collection of a connected DistributionPublishers object.

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

  3. Set the RegisteredSubscriber object properties to reflect the changes to the Subscriber.

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