RegisteredSubscribers Collection

This feature will be removed in a future version of Microsoft SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature.

The RegisteredSubscribers collection contains RegisteredSubscriber objects that reference instances of Microsoft SQL Server maintained as registry entries. These objects are visible to replication as targets for Publisher-originated (push) subscriptions.

SQL-DMO object model that shows the current object

Properties

Remarks

SQL Server replication enhances the registry-maintained lists of instances of SQL Server by associating replication components, such as schedules and security, with registry-listed instances. SQL Distributed Management Objects (SQL-DMO) makes this association visible through the RegisteredSubscriber object and RegisteredSubscribers collection.

For more information about registry-maintained lists of instances of SQL Server, see RegisteredServer Object.

With the RegisteredSubscribers collection, you can:

  • Configure a registered instance of SQL Server for push subscription by associating replication schedules and security with the named instance.

  • Remove replication schedules and security for an instance of SQL Server registered and configured for push subscription, disabling push subscription to the instance.

  • Generate Transact-SQL script that can be used as part of replication administration, such as a script re-creating configuration parameters for all instances of SQL Server.

For more information about configuring push-subscription capable instances using the RegisteredSubscriber object and RegisteredSubscribers collection, see RegisteredSubscriber Object.

To disable a push subscription to a registered instance

  1. Get the appropriate RegisteredSubscribers collection. When disabling a subscription at the Publisher of the data, use the RegisteredSubscribers collection of the Publisher object that references the publishing instance. When disabling a subscription at the Distributor of the data, use the RegisteredSubscribers collection of the DistributionPublisher object referencing the source of the published data.

  2. Use the Remove method of the RegisteredSubscribers collection.

When using the Item or Remove method, the RegisteredSubscribers collection supports member identification using either name or ordinal reference syntax. For example:

Set oRegisteredSubscriber = oPublisher.RegisteredSubscribers("LONDON2")

Or:

Set oRegisteredSubscriber = oPublisher.RegisteredSubscribers(2)