Happy New Year!!

Published On: 2008-12-31By:

2 responses to “Happy New Year!!”

  1. Eliassal says:

    Hi, I went through your tip “Configure SQL Server Service Broker for sending stored procedure data” at http://searchsqlserver.techtarget.com/tip/0,289483,sid87_gci1310106,00.html.
    I found it very interesting and informative. However, whenever I try executing the step to retreive data from the queue
    ************
    DECLARE @dialog_handle UNIQUEIDENTIFIER, @XMLData XML ;
    RECEIVE TOP (1) @dialog_handle = conversation_handle, @XMLData = CAST(message_body AS XML)
    FROM [tcp://SearchSQLServer/SampleQueue]
    END CONVERSATION @dialog_handle
    SELECT @XMLData
    ****************************************
    I get the following error :

    Msg 8418, Level 16, State 1, Line 4
    The conversation handle is missing. Specify a conversation handle.

    I tried BOL, googled but can not find good information.
    Thanks in advance for your help

  2. mrdenny says:

    In this syntax the error means that there was no message received and the @dialog_handle variable was NULL.

    When I’m writing T/SQL to handle Service Broker messages I put logic in just after the receive to see if the @dialog_handle variable is null, and if it is to break out of the code as that means that there was no message processed.

    If you aren’t sure if there are messages to process you can do SELECT statements against the queue and look at the messages without receiving them or prcessing them.

Video

Globally Recognized Expertise

As Microsoft MVP’s and Partners as well as VMware experts, we are summoned by companies all over the world to fine-tune and problem-solve the most difficult architecture, infrastructure and network challenges.

And sometimes we’re asked to share what we did, at events like Microsoft’s PASS Summit 2015.

Awards & Certifications

Microsoft Partner    Microsoft MVP    Microsoft Certified Master    VMWare Partner    VMWare vExpert
   Best Full-Service Cloud Technology Consulting Company    Insights Sccess Award    Technology Headlines Award    Golden Bridge Gold Award    CIO Review Top 20 Azure Solutions Providers
Share via
Copy link