共用方式為


DistributionDatabases Collection

未來的 Microsoft SQL Server 發行版本將不再提供此功能。請避免在新的開發工作中使用此功能,並計劃修改目前使用此功能的應用程式。

The DistributionDatabases collection contains DistributionDatabase objects that expose the properties of Microsoft SQL Server databases used by the replication Distributor for replicated image storage and other tasks.

顯示目前物件的 SQL-DMO 物件模型

Methods

Add Method

Remove Method (Collections)

Item Method

Script Method (Replication Objects)

Refresh Method

 

備註

The DistributionDatabases collection stores a list of distribution databases available at the Distributor. A Publisher using the Distributor selects a single distribution database for each publication managed by the Distributor.

With the DistributionDatabases collection, you can:

  • Create a SQL Server database for Distributor use.
  • Generate a Transact-SQL command batch to script database creation for all databases used by a Distributor.
  • Remove a distribution database.

To remove a distribution database from the Distributor

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

  2. Use the Remove method.