Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

ReplicationServer.UninstallDistributor Method (Boolean)


Uninstalls replication publishing and distribution on the currently connected instance of SQL Server. 

Namespace:   Microsoft.SqlServer.Replication
Assembly:  Microsoft.SqlServer.Rmo (in Microsoft.SqlServer.Rmo.dll)

public void UninstallDistributor(
	bool force


Type: System.Boolean

A Boolean value that specifies whether or not replication objects are removed from the server, even if a remote Distributor cannot be reached. If true, the publishing and Distributor configuration at the current server is uninstalled regardless of whether or not dependent publishing and distribution objects are uninstalled. If false, all dependent publishing and distribution objects are dropped before the Distributor is uninstalled.

Before calling UninstallDistributor, you must first perform the following tasks:

  1. Delete all subscriptions. For more information, see and .3477e367-fc4f-4017-a2d3-b3ac56d7e836decec2d0-711e-4b92-9407-49ff1871d1b0

  2. Delete all publications. For more information, see . 513833b0-2ebd-4685-bb62-fa574ad7aa9f

  3. Drop any distribution databases. For more information, see . 4af9a542-b1fa-4135-b036-848569c1fd9e

The UninstallDistributor method can only be called by members of the sysadmin fixed server role.

The UninstallDistributor method is equivalent to executing the sp_dropdistributor (Transact-SQL) stored procedure.

Return to top
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2015 Microsoft