• subscribe
December 08, 2009 12:00 AM

Managing Service Broker Conversations

Here’s several methods that prevent data loss and improve performance
SQL Server Pro
InstantDoc ID #103131
Downloads
103131.zip

Listing 2: Managing Multiple Conversations’ Code
--@current_thread is a random number between 1 and max. thread number
SELECT TOP(@current_thread)
@dialog_handle = [conversation_handle]
FROM sys.conversation_endpoints with(nolock)
WHERE [state] = 'co'
AND far_service = 'TargetService'
ORDER BY lifetime DESC;

IF @@rowcount 


ARTICLE TOOLS

Comments
    There are no comments to display. Be the first one!
You must log on before posting a comment.

Are you a new visitor? Register Here