Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a scenario where an external application is monitoring a queue and then taking an action when something is put into the queue. I just wrapped this to happen inside of a transaction to try to prevent things from getting out of the queue if the action has failed. What is happening is that under certain conditions the queue will get disabled if I have a failure in my application that causes the transaction to rollback.

What I'm looking for is a way to enable the queue without opening up SQL Server Management Studio.

share|improve this question

The poison message detection will kick in if 5 consecutive RECEIVE statements are rolled back. there is no way to disble this, nor there is any way to re-enable the queue in the queue reader. Because the disabling is asynchronous, it can disable the queue after your logic tries to re-enable a disabled queue.

The proper solution is never to rollback intentionally and handle all errors. However, this isn't always possible. My recommendation would be to hook up an event notification on the queue for the QUEUE_DISABLED event. This will fire a notification and you can react to this notification.

Queues can be re-enabled with:

share|improve this answer
When I manually disable the service through SQL Server Management Studio and run the ALTER QUEUE command it does not appear as re-enabled. Or am I just not being patient enough and waiting long enough? – Aaron Weiker Dec 10 '09 at 5:37
I assume that by disable service in SSMS you mean disable the queue. SSMS doe snot refresh itself if you update metadata in a query windows, you need to hit F5 in the object explorer to force it to refresh. – Remus Rusanu Dec 10 '09 at 8:39

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.