次の方法で共有


DistributionPublisher Object

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

The DistributionPublisher object represents a Publisher using this Distributor for replication.

現在のオブジェクトを表す SQL-DMO オブジェクト モデル

説明

With the DistributionPublisher object, you can:

  • Add a Publisher to the Distributor.

  • Change the properties of an existing Publisher.

To add a Publisher to the Distributor

  1. Create a new DistributionPublisher object.

  2. Set the Name property to the server name of the Publisher.

  3. Set the DistributionDatabase property.

  4. Set the DistributionWorkingDirectory property.

  5. Add the DistributionPublisher object to the DistributionPublishers collection of a connected Distributor object.

To alter an existing Publisher

  1. Get a DistributionPublisher object from the DistributionPublishers collection of a connected Distributor object.

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

  3. Set the DistributionPublisher properties to reflect the changes to the Publisher.

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

Note   The DistributionPublisher object is compatible with instances of SQL Server version 7.0 and later. However, the DistributionPublisher2 object extends the functionality of the DistributionPublisher object for use with features that were introduced in SQL Server 2000.

関連項目

参照