Due to sudden increase of my database .mdf file we found there are 4 internal queue message table are increase unexpectedly. so we decided to delete some range of data from these table.

we try this code:

declare @c uniqueidentifier
    select top 1 @c = conversation_handle from dbo.queuename
    if (@@ROWCOUNT = 0)
    end conversation @c with cleanup

but its try to delete all data and due to space limitation this query cannot execute. my internal message queue table :

enter image description here

enter image description here

  • I edited my answer to your previous question to include a script to dequeue in batches. Since the conversation handle is being reused, you should not end the conversation in this scenario or you may break the application.
    – Dan Guzman
    Oct 24 '20 at 21:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.