Clean up SSB Message Queue
Clean up SSB Message Queue
The following SQL script is used to clean up the specified SSB message queue, QUEUE_NAME.
***
declare @conversationHandle uniqueidentifier
while exists (select 1 from QUEUE_NAME)
begin
 RECEIVE top(1)   
  @conversationHandle=conversation_handle  
        FROM QUEUE_NAME
 End Conversation @conversationHandle
end
*** Key words ***
SQL Server 2005, Service Broker, Message Queue
 
                    
                
 
                
            
         浙公网安备 33010602011771号
浙公网安备 33010602011771号