다음을 통해 공유


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

Count Property

Methods

Add Method

Remove Method (Collections)

Item Method

Script Method (Replication Objects)

Refresh Method

 

주의

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)