次の方法で共有


DistributionDatabase Object

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

The DistributionDatabase object represents a database located at the Distributor used to store replication information. A Distributor can have multiple distribution databases.

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

説明

With the DistributionDatabase object, you can:

  • Create a new distribution database.

  • Change the properties of an existing distribution database.

To add a distribution database to the Distributor

  1. Create a new DistributionDatabase object.

  2. Set the Name property to the name of the new distribution database.

  3. Set the SecurityMode property as appropriate.

  4. If the SecurityMode property is set to SQLDMOSecurity_Normal, set the StandardLogin and StandardPassword properties as appropriate.

  5. Add the DistributionDatabase object to the DistributionDatabases collection of a connected Distributor object.

To alter an existing distribution database

  1. Get a DistributionDatabase object from the DistributionDatabases collection of a connected Distributor object.

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

  3. Set the DistributionDatabase properties to reflect the changes to the distribution database.

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

注意注意

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

関連項目

参照