TransSubscriptions Collection (SQL-DMO)

The TransSubscriptions collection contains TransSubscription objects referencing all known (nonanonymous) subscriptions to a transactional or snapshot publication.

Remarks

With the TransSubscriptions object, you can:

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

To remove a transactional or snapshot replication push subscription

  1. Get the TransSubscription object referencing 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.

Note 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)

Methods
Add Method Remove Method (Collections)
Item Method Script Method (Replication Objects)
Refresh Method  

Properties

Count Property

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.