--清理数据库订阅表
 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   

 

相关文章:

  • 2021-12-21
  • 2022-02-11
  • 2021-08-26
  • 2021-12-12
  • 2022-02-12
  • 2022-12-23
  • 2021-12-31
猜你喜欢
  • 2022-12-23
  • 2021-05-07
  • 2021-10-17
  • 2022-01-29
  • 2022-12-23
  • 2021-08-26
  • 2021-12-21
相关资源
相似解决方案