DistributionPublisher Object
未來的 Microsoft SQL Server 版本將移除這項功能。請避免在新的開發工作中使用這項功能,並規劃修改目前使用這項功能的應用程式。
The DistributionPublisher object represents a Publisher using this Distributor for replication.
Properties
備註
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
Create a new DistributionPublisher object.
Set the Name property to the server name of the Publisher.
Set the DistributionDatabase property.
Set the DistributionWorkingDirectory property.
Add the DistributionPublisher object to the DistributionPublishers collection of a connected Distributor object.
To alter an existing Publisher
Get a DistributionPublisher object from the DistributionPublishers collection of a connected Distributor object.
Use the BeginAlter method to mark the beginning of the changes.
Set the DistributionPublisher properties to reflect the changes to the Publisher.
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.