清理数据库订阅表
--清理数据库订阅表 declare @id int declare @content varchar(500) Declare Cur Cursor local For SELECT id FROM sys.dm_qn_subscriptions Open Cur Fetch next From Cur Into @id While @@fetch_status=0 Begin set @content = 'KILL QUERY NOTIFICATION SUBSCRIPTION ' + convert( varchar(100),@id) exec(@content) Fetch Next From Cur Into @id End Close Cur