DistributionDatabase Object (SQL-DMO)

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

Remarks

With the DistributionDatabase object, you can:

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™.
Methods
BeginAlter Method Refresh Method
CancelAlter Method Remove Method (Objects)
DoAlter Method Script Method (Replication Objects)

Properties
AgentsStatus Property LogFileSize Property
DataFile Property LogFolder Property
DataFileSize Property MaxDistributionRetention Property
DataFolder Property MinDistributionRetention Property
DistributionCleanupTaskName Property Name Property
HistoryCleanupTaskName Property SecurityMode Property (DistributionDatabase, IntegratedSecurity)
HistoryRetention Property StandardLogin Property
LogFile Property StandardPassword Property

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.