다음을 통해 공유


TransSubscription Object

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

The TransSubscription object represents a push subscription (made from the Publisher) to a transactional or snapshot publication.

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

Properties

DistributionJobID Property

Subscriber Property

EnabledForSyncMgr Property

SubscriberType Property (TransPullSubscription, TransSubscription)

FullSubscription Property

SubscriptionDB Property

Name Property

SubscriptionType Property

Status Property (Subscription Objects)

SyncType Property

Methods

BeginAlter Method

ReInitialize Method

CancelAlter Method

Remove Method (Objects)

DoAlter Method

Script Method (Replication Objects)

주의

With the TransSubscription object, you can:

  • Add a push subscription to a transactional publication.
  • Change the properties of an existing push subscription to a transactional publication.
  • Add a push subscription to a snapshot publication.
  • Change the properties of an existing push subscription to a snapshot publication.

[!참고] The TransSubscription object is compatible with instances of SQL Server versions 7.0 and later. However, the TransSubscription2 object extends the functionality of the TransSubscription object for use with features that were introduced in SQL Server 2000.

To create a transactional push subscription at the Publisher

  1. Create a new TransSubscription object.

  2. Set the Subscriber property to the name of an existing Subscriber.

  3. Set the SubscriptionDB property to the name of the database (at the Subscriber) where the subscription data is to be stored.

  4. Note that the Name property defaults to Subscriber**:**subscription_database.

  5. Add the TransSubscription object to the TransSubscriptions collection of a connected TransPublication object.

To alter an existing transactional push subscription

  1. Get a TransSubscription object from the TransSubscriptions collection of a connected TransPublication object.

  2. Use the BeginAlter method to mark the beginning of the changes.

  3. Set the TransSubscription object properties to reflect the changes to the transactional push subscription.

  4. Use the DoAlter method to submit the changes to Microsoft SQL Server.

To create a snapshot push subscription at the Publisher

  1. Create a new TransSubscription object.

  2. Set the Subscriber property to the name of an existing Subscriber.

  3. Set the SubscriptionDB property to the name of the database (at the Subscriber) where the subscription data is to be stored.

  4. Note that the Name property defaults to Subscriber**:**subscription_database.

  5. Add the TransSubscription object to the TransSubscriptions collection of a connected TransPublication object containing a snapshot publication.

To alter an existing snapshot push subscription

  1. Get a TransSubscription object from the TransSubscriptions collection of a connected TransPublication object containing a snapshot publication.

  2. Use the BeginAlter method to mark the beginning of the changes.

  3. Set the TransSubscription properties to reflect the changes to the snapshot push subscription.

  4. Use the DoAlter method to submit the changes to SQL Server.

참고 항목

참조

TransSubscription2 Object

도움말 및 정보

SQL Server 2005 지원 받기