Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

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 kick off the following command in my app:

WAITFOR (RECEIVE CONVERT(int, message_body) AS Message FROM MyQueue)

When I run `sp_who2 active', I get Status=SUSPENDED and Command=DELETE

enter image description here

Note: moved from StackOverflow.

share|improve this question
up vote 9 down vote accepted

Because is a DELETE. RECEIVe is just syntactic sugar for something like

DELETE from queue
WHERE status = <receivable>;

If you enable retention then is an UPDATE, and will show as an UPDATE. There are some details, like how conversation group locking is done, how the proper message ExactlyOnceInOrder semantics are ensured and the syntax tree of RECEIVE is not truly possible to be built in T-SQL. As I said, details...

Is no coincidence I recommend in Using Tables as Queues to use the OUTPUT clause of DELETE to 'dequeue' from a table...

share|improve this answer
Thanks. Why does the status show as SUSPENDED? – AngryHacker Dec 17 '12 at 22:08
Because is waiting for messages. I assume is a WAITFOR(RECEIVE). – Remus Rusanu Dec 17 '12 at 22:11

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.