Drops a distribution Publisher. This stored procedure is executed at the Distributor on any database.
sp_dropdistpublisher [ @publisher = ] 'publisher'
[ , [ @no_checks = ] no_checks ]
[@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)
sp_dropdistpublisher is used in all types of replication.
Only members of the sysadmin fixed server role can execute sp_dropdistpublisher.