다음을 통해 공유


TransSubscriptions Collection

Microsoft SQL Server의 이후 버전에서는 이 기능이 제거됩니다. 새 개발 작업에서는 이 기능을 사용하지 말고, 현재 이 기능을 사용하는 응용 프로그램은 수정하십시오.

The TransSubscriptions collection contains TransSubscription objects that reference all known (non-anonymous) subscriptions to a transactional or snapshot publication.

현재 개체를 보여 주는 SQL-DMO 개체 모델

Properties

Count Property

 

Methods

Add Method

Remove Method (Collections)

Item Method

Script Method (Replication Objects)

Refresh Method

 

주의

With the TransSubscriptions object, you can:

  • Create a Publisher-initiated (push) subscription to a transactional or snapshot replication publication.
  • Generate a Transact-SQL script that can be used as part of the administration of all subscriptions to a transactional or snapshot publication.
  • Remove a push subscription to a transactional or snapshot replication publication.

For more information about creating push subscriptions to transactional or snapshot publications by using the TransSubscription object and TransSubscriptions collection, see the TransSubscription Objectsection.

To remove a transactional or snapshot replication push subscription

  1. Get the TransSubscription object that references the target subscription from the TransSubscriptions collection of the TransPublication object referencing the publication.

  2. Query the SubscriptionType property of the TransSubscription object.

  3. If SubscriptionType returns SQLDMOSubscription_Push, the referenced subscription is a push subscription and can be safely removed at the Publisher. Use the Remove method of the TransSubscription object to remove the subscription.

    [!참고] Removing a subscription by using the Remove method of a TransSubscription object does not remove a replicated copy of the publication articles at any Subscriber.

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

Set oTransSubscription = oTransPublication.TransSubscriptions("[LONDON2_Push]")

Or:

Set oTransSubscription = oTransPublication.TransSubscriptions(2)