次の方法で共有


RegisteredSubscribers Collection

この機能は、将来のバージョンの Microsoft SQL Server では削除される予定です。 新しい開発作業では、この機能の使用を避け、現在この機能を使用しているアプリケーションは修正するようにしてください。

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 オブジェクト モデル

Properties

説明

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)