sp_dropdistpublisher

Transact-SQL Reference

Transact-SQL Reference

sp_dropdistpublisher

Drops a distribution Publisher. This stored procedure is executed at the Distributor on any database.

Syntax

sp_dropdistpublisher [ @publisher = ] 'publisher'
    [ , [ @no_checks = ] no_checks ]

Arguments

[@publisher = ] 'publisher'

Is the Publisher to drop. publisher is sysname, with no default.

[@no_checks = ] no_checks

Specifies whether sp_dropdistpublisher checks that the Publisher has uninstalled the server as the Distributor. no_checks is bit, with a default of 0. If 0 and the distribution publisher is remote, the stored procedure verifies that the remote publisher has uninstalled the local server as the distributor. If 0 and the distribution Publisher is local, the stored procedure verifies that there are no publication or distribution objects remaining on the local server. If 1, all the replication objects associated with the distribution Publisher are dropped. After doing this, the remote Publisher must uninstall replication using sp_dropdistributor with @ignore_distributor = 1.

Return Code Values

0 (success) or 1 (failure)

Remarks

sp_dropdistpublisher is used in all types of replication.

Permissions

Only members of the sysadmin fixed server role can execute sp_dropdistpublisher.

See Also

sp_adddistpublisher

sp_changedistpublisher

sp_helpdistpublisher

System Stored Procedures