次の方法で共有


TransPullSubscription Object

この機能は、将来のバージョンの Microsoft SQL Server では削除される予定です。新規の開発作業ではこの機能を使用しないようにし、現在この機能を使用しているアプリケーションは修正することを検討してください。

The TransPullSubscription object represents a Subscriber-originated pull or an anonymous subscription to a transactional or snapshot publication.

Properties

DistributionJobID Property

AllowMergePublication Property

Distributor Property

PublicationAttributes Property

EnabledForSyncMgr Property

PublicationDB Property

FTPAddress Property

Publisher Property

FTPLogin Property

SubscriberLogin Property

FTPPassword Property

SubscriberPassword Property

FTPPort Property

SubscriberSecurityMode Property

LastDistributionDate Property

SubscriberType Property (TransPullSubscription, TransSubscription)

Name Property

SubscriptionType Property

Methods

BeginAlter Method

ReInitialize Method

CancelAlter Method

Remove Method (Objects)

DoAlter Method

Script Method (Replication Objects)

EnumJobInfo Method

解説

With the TransPullSubscription object, you can:

  • Add a pull or anonymous subscription to a transactional publication.
  • Change the properties of an existing pull or anonymous subscription to a transactional publication.
  • Add a pull or anonymous subscription to a snapshot publication.
  • Change the properties of an existing pull or anonymous subscription to a snapshot publication.
ms131566.note(ja-jp,SQL.90).gifメモ :
The TransPullSubscription object is compatible with instances of SQL Server 2000 and SQL Server version 7.0. However, the TransPullSubscription2 object extends the functionality of the TransPullSubscription object for use with features that are new in SQL Server 2000.

To create a transactional pull subscription at the Subscriber

  1. Create a new TransPullSubscription object.

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

  3. Set the Distributor property to the name of the Distributor.

  4. Set the PublicationDB property to the name of the database (at the Publisher) where the publication is located.

  5. Set the Publication property to the name of the publication to which to subscribe.

  6. Set the SubscriptionType property to SQLDMOSubscription_Pull.

  7. Set the SecurityMode property of the DistributorSecurity object property as appropriate.

  8. If the SecurityMode property of the DistributorSecurity object property is set to SQLDMOReplSecurity_Normal, set the StandardLogin and StandardPassword properties of the DistributorSecurity object property.

  9. Set the SecurityMode property of the PublisherSecurity object property as appropriate.

  10. If the SecurityMode property of the PublisherSecurity object property is set to SQLDMOReplSecurity_Normal, set the StandardLogin and StandardPassword properties of the PublisherSecurity object property.

  11. Note that the Name property defaults to publisher**:publication_database:**publication.

  12. Add the TransPullSubscription object to the TransPullSubscriptions collection of a connected ReplicationDatabase object at the Subscriber.

  13. Get a ReplicationDatabase object that contains the publication from the ReplicationDatabases collection of a Replication object connected to the Publisher.

  14. Use the EnableTransSubscription method of the ReplicationDatabase object that is connected to the Publisher.

To create a transactional anonymous subscription at the Subscriber

  1. Create a new TransPullSubscription object.

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

  3. Set the PublicationDB property to the name of the database (at the Publisher) where the publication is located.

  4. Set the Publication property to the name of the publication to which to subscribe.

  5. Set the SubscriptionType property to SQLDMOSubscription_Anonymous.

  6. Set the SecurityMode property of the DistributorSecurity object property as appropriate.

  7. If the SecurityMode property of the DistributorSecurity object property is set to SQLDMOReplSecurity_Normal, set the StandardLogin and StandardPassword properties of the DistributorSecurity object property.

  8. Set the SecurityMode property of the PublisherSecurity object property as appropriate.

  9. If the SecurityMode property of the PublisherSecurity object property is set to SQLDMOReplSecurity_Normal, set the StandardLogin and StandardPassword properties of the PublisherSecurity object property.

  10. Note that the Name property defaults to publisher**:publication_database:**publication.

  11. Add the TransPullSubscription object to the TransPullSubscriptions collection of a connected ReplicationDatabase object at the Subscriber.

To alter an existing transactional pull subscription at the Subscriber

  1. Get a TransPullSubscription object from the TransPullSubscriptions collection of a connected ReplicationDatabase object at the Subscriber.

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

  3. Set the TransPullSubscription object properties to reflect the changes to the transactional pull subscription.

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

To alter an existing transactional anonymous subscription at the Subscriber

  1. Get a TransPullSubscription object containing a transactional anonymous subscription from the TransPullSubscriptions collection of a connected ReplicationDatabase object at the Subscriber.

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

  3. Set the TransPullSubscription object properties to reflect the changes to the transactional anonymous subscription.

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

To create a snapshot pull subscription at the Subscriber

  1. Create a new TransPullSubscription object.

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

  3. Set the PublicationDB property to the name of the database (at the Publisher) where the snapshot publication is located.

  4. Set the Publication property to the name of the snapshot publication to which to subscribe.

  5. Set the SubscriptionType property to SQLDMOSubscription_Pull.

  6. Set the SecurityMode property of the DistributorSecurity object property as appropriate.

  7. If the SecurityMode property of the DistributorSecurity object property is set to SQLDMOReplSecurity_Normal, set the StandardLogin and StandardPassword properties of the DistributorSecurity object property.

  8. Set the SecurityMode property of the PublisherSecurity object property as appropriate.

  9. If the SecurityMode property of the PublisherSecurity object property is set to SQLDMOReplSecurity_Normal, set the StandardLogin and StandardPassword properties of the PublisherSecurity object property.

  10. Note that the Name property defaults to publisher**:publication_database:**publication.

  11. Add the TransPullSubscription object to the TransPullSubscriptions collection of a connected ReplicationDatabase object at the Subscriber.

  12. Get a ReplicationDatabase object that contains the publication from the ReplicationDatabases collection of a Replication object connected to the Publisher.

  13. Use the EnableTransSubscription method of the ReplicationDatabase object connected to the Publisher.Use the DoAlter method to submit the changes to SQL Server.

To create a snapshot anonymous subscription at the Subscriber

  1. Create a new TransPullSubscription object.

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

  3. Set the PublicationDB property to the name of the database (at the Publisher) where the snapshot publication is located.

  4. Set the Publication property to the name of the snapshot publication to subscribe to.

  5. Set the SubscriptionType property to SQLDMOSubscription_Anonymous.

  6. Set the SecurityMode property of the DistributorSecurity object property as appropriate.

  7. If the SecurityMode property of the DistributorSecurity object property is set to SQLDMOReplSecurity_Normal, set the StandardLogin and StandardPassword properties of the DistributorSecurity object property.

  8. Set the SecurityMode property of the PublisherSecurity object property as appropriate.

  9. If the SecurityMode property of the PublisherSecurity object property is set to SQLDMOReplSecurity_Normal, set the StandardLogin and StandardPassword properties of the PublisherSecurity object property.

  10. Note that the Name property defaults to publisher**:publication_database:**publication.

  11. Add the TransPullSubscription object to the TransPullSubscriptions collection of a connected ReplicationDatabase object at the Subscriber.

To alter an existing snapshot pull subscription at the Subscriber

  1. Get a TransPullSubscription object containing a snapshot pull subscription from the TransPullSubscriptions collection of a connected ReplicationDatabase object at the Subscriber.

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

  3. Set the TransPullSubscription object properties to reflect the changes to the snapshot pull subscription.

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

To alter an existing snapshot anonymous subscription at the Subscriber

  1. Get a TransPullSubscription object containing a snapshot anonymous subscription from the TransPullSubscriptions collection of a connected ReplicationDatabase object at the Subscriber.

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

  3. Set the TransPullSubscription object properties to reflect the changes to the snapshot anonymous subscription.

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

参照

関連項目

TransPullSubscription2 Object

ヘルプおよび情報

SQL Server 2005 の参考資料の入手