0

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
while(1=1)
begin
    select top 1 @c = conversation_handle from dbo.queuename
    if (@@ROWCOUNT = 0)
    break
    end conversation @c with cleanup
end  

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

1
  • 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.