title: How can you find out what has a Service Broker conversation locked?
body: <p>I have a service broker queue with one conversation that is not being processed by anything. However it is not returning anything when I run: </p>
  
  <pre><code>RECEIVE TOP(1000) * FROM dbo.QueueName
  </code></pre>
  
  <p>However if I run this:</p>
  
  <pre><code>SELECT COUNT(*) FROM dbo.QueueName
  </code></pre>
  
  <p>I am getting a figure in the thousands. The figure is not changing either. I assume that some process has the Conversation Group locked but is not doing anything with it. How can I tell if this is the case and how can I tell which SPID has the lock?</p>