【问题标题】:How to check if my Queue (Service Broker) is enable or not?如何检查我的队列(服务代理)是否启用?
【发布时间】:2014-09-10 22:23:22
【问题描述】:

由于尚未确定的原因,我的队列很少被禁用,当发生这种情况时,我会使用此查询再次启用:

  ALTER QUEUE [MyQueue] WITH STATUS = ON;

但是,我想知道队列何时被禁用,例如事件 (T-SQL),或者检查每个“x”时间是否启用队列。

【问题讨论】:

    标签: sql sql-server-2008 service-broker


    【解决方案1】:

    查看sys.service_queues

    select is_receive_enabled
    from sys.service_queues
    where name = N'MyQueue';
    

    您的队列被poison message handling mechanism 禁用。发生这种情况时会触发一个事件,该事件可以通过事件通知捕获,请参阅Service Broker Application Queue Disable Event

    【讨论】:

      猜你喜欢
      • 2018-04-26
      • 1970-01-01
      • 1970-01-01
      • 2014-08-22
      • 1970-01-01
      • 2014-02-27
      • 2011-06-22
      • 2012-02-17
      相关资源
      最近更新 更多