Have a happy New Year. Go spend the night with family.
That’s what I’m doing tonight.
Denny
Share
0 Responses
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
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.
This website uses cookies to improve your experience. By using this website you agree to our policies found on our Privacy Page. Cookie settingsACCEPT
Privacy & Cookies Policy
Privacy Overview
This website uses cookies to improve your experience while you navigate through the website. Out of these cookies, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may have an effect on your browsing experience.
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
0 Responses
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
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.