我使用向导和T-sql在sql Server 2008中配置了一个发行版,但之后我想删除它使用向导(右键单击复制并选择“禁用发布和发布…”)或执行以下命令:其参数:
exec sp_dropdistributor @no_checks = 1 -- no new results with @ignore_distributor = 1
将出现此错误:
Msq 21122,Level 16,State 1,Procedure sp_dropdistributiondb Line 124
Cannot drop the distribution database ‘lobloblob’ because it is
currently in use.
解决方法
试试这个:
SELECT spid FROM sys.sysprocesses WHERE dbid = db_id(‘distribution’)
杀死spid并再试一次.现在它应该工作.