几条关于查看和删除发布和分发的命令
--查看当前分发服务器属性 USE master EXEC sp_helpdistributor --查看当前发布服务器属性 USE master EXEC sp_helpdistpublisher --彻底删除发布和分发 DECLARE @distributionDB AS sysname; DECLARE @publisher AS sysname; DECLARE @publicationDB as sysname; SET @distributionDB = N'distribution'; SET @publisher = N'MyPublisherNm'; SET @publicationDB = N'AdventureWorks2012'; -- 删除发布数据库. USE [AdventureWorks2012] EXEC sp_removedbreplication @publicationDB; -- 从分发服务删除注册的本地发布. USE master EXEC sp_dropdistpublisher @publisher; -- 删除分发数据库. EXEC sp_dropdistributiondb @distributionDB; -- 删除分发服务. EXEC sp_dropdistributor;