TransSubscription Object
この機能は、将来のバージョンの Microsoft SQL Server では削除される予定です。新規の開発作業ではこの機能を使用しないようにし、現在この機能を使用しているアプリケーションは修正することを検討してください。
The TransSubscription object represents a push subscription (made from the Publisher) to a transactional or snapshot publication.
Properties
SubscriberType Property (TransPullSubscription, TransSubscription) |
|
Methods
解説
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
Create a new TransSubscription object.
Set the Subscriber property to the name of an existing Subscriber.
Set the SubscriptionDB property to the name of the database (at the Subscriber) where the subscription data is to be stored.
Note that the Name property defaults to Subscriber**:**subscription_database.
Add the TransSubscription object to the TransSubscriptions collection of a connected TransPublication object.
To alter an existing transactional push subscription
Get a TransSubscription object from the TransSubscriptions collection of a connected TransPublication object.
Use the BeginAlter method to mark the beginning of the changes.
Set the TransSubscription object properties to reflect the changes to the transactional push subscription.
Use the DoAlter method to submit the changes to Microsoft SQL Server.
To create a snapshot push subscription at the Publisher
Create a new TransSubscription object.
Set the Subscriber property to the name of an existing Subscriber.
Set the SubscriptionDB property to the name of the database (at the Subscriber) where the subscription data is to be stored.
Note that the Name property defaults to Subscriber**:**subscription_database.
Add the TransSubscription object to the TransSubscriptions collection of a connected TransPublication object containing a snapshot publication.
To alter an existing snapshot push subscription
Get a TransSubscription object from the TransSubscriptions collection of a connected TransPublication object containing a snapshot publication.
Use the BeginAlter method to mark the beginning of the changes.
Set the TransSubscription properties to reflect the changes to the snapshot push subscription.
Use the DoAlter method to submit the changes to SQL Server.