SQL Service Broker ForumCome here to ask questions about SQL Server Service Broker© 2009 Microsoft Corporation. All rights reserved.Fri, 27 Nov 2009 13:14:46 Zcb51583a-90d0-4960-9362-ac25870e5252http://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/a0fa34e5-d11f-431e-a3b3-6a59b20ce3fbhttp://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/a0fa34e5-d11f-431e-a3b3-6a59b20ce3fbyosonuhttp://social.msdn.microsoft.com/Profile/en-US/?user=yosonuCalling SSIS packages from a Service Broker Queue<span style="font-family:Verdana,Geneva,Arial,Sans-serif"><font size=2>I would like to call an SSIS package from a Service Broker Queue.<br><br>There is one way that I am aware of -<br><br>Using xp_cmdshell from within an activation stored procedure and using DTEXEC.<br><br>Is there a more elegant way of executing an SSIS package from within SSB?<br><br>Also, I am not interested in writing a .NET external activator to process my messages in the queue. I would like this operation to be strictly database oriented. Having said this, I am also trying to avoid triggers processing the messages in the queue.<br><br>Thank you!<br></font></span>Mon, 26 Feb 2007 06:08:22 Z2009-11-27T13:14:45Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/68fa71c4-f1a6-431c-a078-4d116fb9f582http://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/68fa71c4-f1a6-431c-a078-4d116fb9f582samiraEmhttp://social.msdn.microsoft.com/Profile/en-US/?user=samiraEmProblem with sending mail On Database Mail SQL Server 2008<p class=MsoNormal style="text-align:left" dir=rtl align=right><span dir=ltr>I want to send a simple mail using DATABASE MAIL feature in SQL SERVER 2008.</span></p> <p class=MsoNormal style="text-align:left" dir=rtl align=right><span dir=ltr>I've defined a public profile.</span> <span style="font-family:'Arial','sans-serif'" lang=FA></span></p> <p class=MsoNormal style="text-align:left" dir=rtl align=right><span dir=ltr>but   I can't send a mail with sp_send_dbmail stored procedure in 'msdb' database . </span> <span style="font-family:'Arial','sans-serif'" lang=FA><span>  </span> </span></p> <p class=MsoNormal style="text-align:left" dir=rtl align=right><span dir=ltr>when I execute sp_send_dbmail in the Managment Studio  the message is<br/> &quot;Mail queued&quot;  but the mail is not sent.</span> <span style="font-family:'Arial','sans-serif'" lang=FA></span></p> <p>here is the log file after executing sp_send_dbmail:</p> <p><br/> 1)  &quot;DatabaseMail process is started&quot;</p> <p>2)The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 2 (2009-11-22T16:17:17). Exception Message: Cannot send mails to mail server. (Failure sending mail.).</p> <p class=MsoNormal style="text-align:left" dir=rtl align=right><span dir=ltr>please help me.</span> <span style="font-family:'Arial','sans-serif'" lang=FA></span></p> <p class=MsoNormal style="text-align:left" dir=rtl align=right><span dir=ltr>SamiraEm</span> <span style="font-family:'Arial','sans-serif'" lang=FA></span></p>Mon, 23 Nov 2009 07:59:50 Z2009-11-27T05:57:03Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/bf4ebe15-b486-4d98-94f0-ac482257f647http://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/bf4ebe15-b486-4d98-94f0-ac482257f647zmrcichttp://social.msdn.microsoft.com/Profile/en-US/?user=zmrcicSqlDependency OnChange Event Fires repeatedly<p align=left><font face=Arial size=2>there is similar thread about SQL dependency....</font></p> <p align=left>I have sqldep. on one form in my app...it looks like when user close form and reopen Onchange event fires repeatedly....</p> <p align=left>Do I need to close whole application...</p><strong></strong>Thu, 31 Jul 2008 14:27:42 Z2009-11-22T05:42:40Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/5a84e349-2be4-478a-b678-af9430f19194http://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/5a84e349-2be4-478a-b678-af9430f19194CoderMikehttp://social.msdn.microsoft.com/Profile/en-US/?user=CoderMikeIs Service Broker Enabled?<p>Hello,</p> <p>I've been trying for two days now to get SQL Cache Dependencies to work. So far, nothing has worked, and I have been around the block a few times now on this one. So now I'm going back to basics, as I think my code and queries are fine. My first question is how to confirm that I have a Service Broker that is up and running. I am using SSX as my database engine. Other posts mention how the &quot;look at the service broker folder&quot;, and I don't see a folder anywhere. Can someone tell me what to look for? I've added various SP's based on tutorials on web sites, so I can't tell if those SP's are mine or theirs at this point (I've been at this too long). Where is the &quot;folder&quot; the other posts have mentioned? Do I need to do anything special to get it? Did I install all the right files?</p> <p>Mike</p>Wed, 20 Dec 2006 16:48:55 Z2009-11-20T12:09:30Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/a6b61da8-aec2-40de-bf88-c4f5cae3de48http://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/a6b61da8-aec2-40de-bf88-c4f5cae3de48barkingdoghttp://social.msdn.microsoft.com/Profile/en-US/?user=barkingdogService Broker and MSMQOne of our developers thinks that Service Broker is &quot;built on&quot; or relies on MSMQ. Is that correct?<br/><br/>TIA,<br/><br/>barkingdogThu, 19 Nov 2009 15:57:19 Z2009-11-19T18:08:55Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/09f350e3-51f4-4e21-92c6-758c2b3af7b1http://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/09f350e3-51f4-4e21-92c6-758c2b3af7b1barkingdoghttp://social.msdn.microsoft.com/Profile/en-US/?user=barkingdogService Broker availabilityIs Service Broker available in Sql 2008 Standard,  Enteprrise edition only, or both editions?<br/><br/>TIA,<br/><br/>Barkingdog<br/>Thu, 19 Nov 2009 15:55:26 Z2009-11-19T17:27:10Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/f6e93024-efac-4df4-a3df-8c03670a1266http://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/f6e93024-efac-4df4-a3df-8c03670a1266Moonracerhttp://social.msdn.microsoft.com/Profile/en-US/?user=MoonracerHow to know what BRKR TASK (or any background task for that matter) is doing?<p align=left><font face=Arial size=2>Sometimes we have some pretty serious CPU spikes and I would like to be able to pinpoint the exact issue. I have been able through the DMVs to associate a session with an operating system thread. That's great if I have a batch that's causing the problem with a non NULL sql_handle. However, how do I further narrow down what is going on with the background service broker tasks using the DMVs? Or am I just at the blind mercy of SQL Server at this point? What can I query to know what the heck is going on?</font></p>Thu, 03 Apr 2008 21:48:54 Z2009-11-18T20:11:02Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/7ae00c97-7944-4d98-bbae-308513789e48http://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/7ae00c97-7944-4d98-bbae-308513789e48Jyothivhttp://social.msdn.microsoft.com/Profile/en-US/?user=JyothivMemory issues with SERVICE_BROKER <p>Hi <br/><br/>We are getting &quot;Insufficient memeory available buffer pool&quot; alerts in sql Error log. I looked into the error log and found there is a memory dump created with it.<br/><br/>This server is runnign service broker on it.<br/><br/><br/>Error:<br/>2009-11-11 05:08:02.10 spid19s     Error: 802, Severity: 17, State: 17.<br/>2009-11-11 05:08:02.10 spid19s     There is insufficient memory available in the buffer pool.<br/>2009-11-11 05:08:02.14 spid23s      Failed allocate pages: FAIL_PAGE_ALLOCATION 1<br/>2009-11-11 05:08:02.14 spid58      Error: 701, Severity: 17, State: 171.<br/>2009-11-11 05:08:02.14 spid58      There is insufficient system memory in resource pool 'default' to run this query.<br/>2009-11-11 05:08:02.19 Server      Error: 17300, Severity: 16, State: 1. (Params:). The error is printed in terse mode because there was error during formatting. Tracing, ETW, notifications etc are skipped.<br/>2009-11-11 05:08:02.19 Server      Error: 17312, Severity: 16, State: 1. (Params:). The error is printed in terse mode because there was error during formatting. Tracing, ETW, notifications etc are skipped.<br/>2009-11-11 05:08:02.19 Server      Error: 17053, Severity: 16, State: 1. (Params:). The error is printed in terse mode because there was error during formatting. Tracing, ETW, notifications etc are skipped.<br/>2009-11-11 05:08:02.19 spid53      Error: 701, Severity: 17, State: 89.<br/>2009-11-11 05:08:02.19 spid53      There is insufficient system memory in resource pool 'default' to run this query.<br/>2009-11-11 05:08:02.19 spid16s     Error: 802, Severity: 17, State: 17.<br/>2009-11-11 05:08:02.19 spid16s     There is insufficient memory available in the buffer pool.<br/>2009-11-11 05:08:02.20 spid19s     Error: 9646, Severity: 16, State: 3. (Params:). The error is printed in terse mode because there was error during formatting. Tracing, ETW, notifications etc are skipped.<br/>2009-11-11 05:08:02.21 spid19s     Error: 701, Severity: 17, State: 123.<br/>2009-11-11 05:08:02.21 spid19s     There is insufficient system memory in resource pool 'internal' to run this query.<br/>2009-11-11 05:08:02.23 spid19s     Error: 9646, Severity: 16, State: 3. (Params:). The error is printed in terse mode because there was error during formatting. Tracing, ETW, notifications etc are skipped.<br/>2009-11-11 05:08:02.28 spid16s     Error: 9645, Severity: 16, State: 4. (Params:). The error is printed in terse mode because there was error during formatting. Tracing, ETW, notifications etc are skipped.<br/>2009-11-11 05:08:02.28 spid16s     Error: 701, Severity: 17, State: 178.<br/>2009-11-11 05:08:02.28 spid16s     There is insufficient system memory in resource pool 'internal' to run this query.<br/>2009-11-11 05:08:02.29 spid16s     Error: 9645, Severity: 16, State: 4. (Params:). The error is printed in terse mode because there was error during formatting. Tracing, ETW, notifications etc are skipped.<br/>2009-11-11 05:08:02.29 spid16s     Error: 701, Severity: 17, State: 178.<br/>2009-11-11 05:08:02.29 spid16s     There is insufficient system memory in resource pool 'internal' to run this query.<br/>2009-11-11 05:08:02.30 spid16s     Error: 9645, Severity: 16, State: 4. (Params:). The error is printed in terse mode because there was error during formatting. Tracing, ETW, notifications etc are skipped.<br/>2009-11-11 05:08:02.30 spid16s     Error: 701, Severity: 17, State: 178.<br/>2009-11-11 05:08:02.30 spid16s     There is insufficient system memory in resource pool 'internal' to run this query.<br/>2009-11-11 05:08:02.30 spid16s     Error: 9645, Severity: 16, State: 4. (Params:). The error is printed in terse mode because there was error during formatting. Tracing, ETW, notifications etc are skipped.<br/>2009-11-11 05:08:02.30 spid16s     Error: 701, Severity: 17, State: 178.<br/>2009-11-11 05:08:02.30 spid16s     There is insufficient system memory in resource pool 'internal' to run this query.<br/>2009-11-11 05:08:02.30 spid16s     Error: 9645, Severity: 16, State: 4. (Params:). The error is printed in terse mode because there was error during formatting. Tracing, ETW, notifications etc are skipped.<br/>2009-11-11 05:08:02.31 spid19s     Error: 701, Severity: 17, State: 123.<br/>2009-11-11 05:08:02.31 spid19s     There is insufficient system memory in resource pool 'internal' to run this query.<br/>2009-11-11 05:08:02.37 spid55   <br/><br/>Server Memrory Configuration:<br/>Physical Memory - 16GB<br/>SQL max mem - 14GB<br/><br/>OS: WIN2008SP1 -  Build 6.1.10.1<br/>SQL 100.2520.0 (x64)<br/><br/>Please help me on figuring out the root cause for this error<br/><br/>thanks<br/>Jyothi<br/></p> <p><br/><br/> </p><hr class="sig">JyothiWed, 11 Nov 2009 17:02:28 Z2009-11-17T21:28:06Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/ee3dbf95-bf09-47e4-b908-42ca167d1b03http://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/ee3dbf95-bf09-47e4-b908-42ca167d1b03shahthttp://social.msdn.microsoft.com/Profile/en-US/?user=shahtService Broker set up between two sql server 2005 instances on non trusted networksHello,<br/><br/>I would like to know whether service broker can be set up to exchange messages between two sql server 2005 instances running on two non-trusted networks. We have ability to open up tcp ports on the both networks. Any info or link to it as to how to do it will be helpful.<br/><br/>Thanks,<br/>tshah.Mon, 16 Nov 2009 17:53:39 Z2009-11-16T21:55:43Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/8cf8c9cb-f842-4517-8978-e309c19cef18http://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/8cf8c9cb-f842-4517-8978-e309c19cef18Gawain Zhanghttp://social.msdn.microsoft.com/Profile/en-US/?user=Gawain%20ZhangQUEUE ACTIVATION - CPU 100%Hi all,  <div>  When I set the Queue Activation Status = ON , the Procedure can be activation, but the Target Server CPU still used 100%. even if not exists message<span style="font-family:monospace;font-size:medium"><span style="font-size:16px;white-space:pre-wrap"> receive.</span></span></div> <div><span style="font-family:monospace;font-size:medium"><span style="font-size:16px;white-space:pre-wrap">It looks like just Queue monitor process running. when I killed that process the CPU rate normal.</span></span></div> <div><br/></div> <div>  [single-core cpu 100%,dual-core cpu 50%]</div> <div><br/></div> <div>Thanks</div>Thu, 12 Nov 2009 09:03:37 Z2009-11-13T07:06:56Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/74256201-adaf-48be-87dd-00566e4a55b9http://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/74256201-adaf-48be-87dd-00566e4a55b9Nir Zoharhttp://social.msdn.microsoft.com/Profile/en-US/?user=Nir%20ZoharService broker - What are the implications of leaving messages in a converation target queue ?Hi,<br/>I developed an application that uses service broker for asynchronous long batch processing.<br/>It has 2 queues :<br/>1. Queue1 that gets the command to run with activation to run a stored procedure<br/>2. Queue2 that receiving the message.<br/>What are the implications of leaving messages in queue2 and use it as a &quot;log&quot; for all the activated commands ?<br/>Is it recommended to empty the queue after the process (the SP) is done ?<br/>What is the recommended way to do so ? Does &quot;RECEIVE TOP(1) conversation_handle FROM Queue2&quot; will do the work ?<br/><br/>Thanks,<br/>NirMon, 09 Nov 2009 11:25:41 Z2009-11-13T05:12:37Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/09dce5df-8e27-4548-a3ac-3d0cf4922f78http://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/09dce5df-8e27-4548-a3ac-3d0cf4922f78BigBrohttp://social.msdn.microsoft.com/Profile/en-US/?user=BigBroService Broker<p>My service broker seems to be broken...  The database was restored from another crashed server but i have tried the </p><font color="#0000ff" size=2> <p>ALTER</font><font size=2> </font><font color="#0000ff" size=2>AUTHORIZATION</font><font size=2> </font><font color="#0000ff" size=2>ON</font><font size=2> </font><font color="#0000ff" size=2>DATABASE</font><font color="#808080" size=2>::</font><font size=2>[SPYDERONTHEWEB] </font><font color="#0000ff" size=2>TO</font><font size=2> [SA]</font><font color="#808080" size=2>;<font color="#0000ff" size=2></p> <p>The error i'm getting is </p> <p> </p> <p>Service Broker needs to access the master key in the database 'SpyderOnTheWeb'.  Error code 25.  The master key has to exist and th service master key encryption is required.</p> <p>Error:  28054, Severity 11, State: 1.</p> <p></font><font color="#808080" size=2> </p></font></font>Tue, 16 May 2006 06:01:27 Z2009-11-12T12:54:16Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/38a58d63-c881-48ac-b400-8b6c8ed2772fhttp://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/38a58d63-c881-48ac-b400-8b6c8ed2772fJR Freyrehttp://social.msdn.microsoft.com/Profile/en-US/?user=JR%20FreyreExternal Activator 2008 - I need a C# example of the message processorHello,   I was able to install the EA service for SQL 2008 and have created the Service Broker queue and notification services.  Looks like the configuration works because the EA service log shows it &quot;sees&quot; the notification services.  What I am confused about is how to create the  executable that the EA service calls ultimately to process the message.   I first created a simple C# console app referecing the ServicebrokerInterface.dll  but the EA log was showing  :<br/><br/>11/9/2009 1:58:28 PM INFO The External Activator service is running.<br/>11/9/2009 1:58:28 PM WARNING An event notification has been dropped<br/>11/9/2009 1:58:28 PM EXCEPTION ERROR = 32, No enabled application monitor is on behalf of queue D197378.CDCTrainingExchange.dbo.OutgoingQueue.<br/><br/>Hence, I pressumed that I needed to use the old EA code example that does contain a ApplicationMonitor class in it.  However, I now consistently get:<br/><br/>11/9/2009 3:31:01 PM INFO Initializing configuration manager completed<br/>11/9/2009 3:31:01 PM INFO The External Activator service is running.<br/>11/9/2009 3:32:48 PM WARNING An event notification has been dropped<br/>11/9/2009 3:35:43 PM WARNING An event notification has been dropped<br/><br/>Unfortunately, the code is not producing any logs so I must pressume it is not being called.  Could someone please point me to a simple code example that would work with the new EA service for SQL 2008?  I downloaded the latest EA code examples but could not find any for this piece.<br/>Mon, 09 Nov 2009 21:07:31 Z2009-11-11T23:27:29Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/1605e757-0395-45e0-82ba-7a247cced78fhttp://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/1605e757-0395-45e0-82ba-7a247cced78flee_grecohttp://social.msdn.microsoft.com/Profile/en-US/?user=lee_grecoTarget sys.conversation_endpoints not purged of closed conversations<p>I hope someone can help me with this as we plan on using Service Broker in a high volume production environment.  The script that builds everything is available if it's needed to diagnose the problem I'm having.</p> <p>I'm having an issue where sys.conversation_endpoints on the target side of a conversation is never getting purged of closed conversations even after the 30 minute delay.  The view is filled with closed conversations and database size is growing every day.  I'm aware I can end conversation with cleanup on these conversations, but I would prefer that Service Broker behaves as expected.  I'm also aware of the problems with the fire and forget model, but my model is request/response/end between 2 databases on the same server instance.  Here's the typical series of events:</p> <p>Initiator sends request<br>Target receives request<br>Target processes request<br>Target sends response<br>Initiator receives response<br>Initiator processes response<br>Initiator ends conversation<br>Target receives EndDialog message<br>Target ends conversation</p> <p>Occasionally during the target's processing of a request, an exception is caught and the Target ends the conversation with an error:</p> <p>Initiator sends request<br>Target receives request<br>Target processes request and recognizes error<br>Target ends conversation with error<br>Initiator receives EndDialog message<br>Initiator ends conversation</p> <p>Here's the trace where Database ID 23 is initiator and 24 is target, no error:</p> <p> <table style="width:556pt;border-collapse:collapse" cellspacing=0 cellpadding=0 width=741 border=0> <colgroup> <col style="width:147pt" width=196> <col style="width:57pt" width=76> <col style="width:152pt" width=203> <col style="width:200pt" width=266> <tbody> <tr style="height:12.75pt" height=17> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;width:147pt;border-bottom:#ece9d8;height:12.75pt;background-color:transparent" width=196 height=17><font size=2>EventClass</font></td> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;width:57pt;border-bottom:#ece9d8;background-color:transparent" width=76><font size=2>DatabaseID</font></td> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;width:152pt;border-bottom:#ece9d8;background-color:transparent" width=203><font size=2>TextData</font></td> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;width:200pt;border-bottom:#ece9d8;background-color:transparent" width=266><font size=2>EventSubClass</font></td></tr> <tr style="height:12.75pt" height=17> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;height:12.75pt;background-color:transparent" height=17><font size=2>Broker:Conversation Group</font></td> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent" align=right><font size=2>23</font></td> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2></font></td> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>1 - Create</font></td></tr> <tr style="height:12.75pt" height=17> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;height:12.75pt;background-color:transparent" height=17><font size=2>Broker:Conversation</font></td> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent" align=right><font size=2>23</font></td> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>STARTED_OUTBOUND</font></td> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>11 - BEGIN DIALOG</font></td></tr> <tr style="height:12.75pt" height=17> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;height:12.75pt;background-color:transparent" height=17><font size=2>Broker:Conversation</font></td> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent" align=right><font size=2>23</font></td> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>CONVERSING</font></td> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>1 - SEND Message</font></td></tr> <tr style="height:12.75pt" height=17> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;height:12.75pt;background-color:transparent" height=17><font size=2>Broker:Message Classify</font></td> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent" align=right><font size=2>23</font></td> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><span style=""><font size=2> </font></span></td> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>1 - Local</font></td></tr> <tr style="height:12.75pt" height=17> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;height:12.75pt;background-color:transparent" height=17><font size=2>Broker:Conversation Group</font></td> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent" align=right><font size=2>24</font></td> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2></font></td> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>1 - Create</font></td></tr> <tr style="height:12.75pt" height=17> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;height:12.75pt;background-color:transparent" height=17><font size=2>Broker:Conversation</font></td> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent" align=right><font size=2>24</font></td> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>STARTED_INBOUND</font></td> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>12 - Dialog Created</font></td></tr> <tr style="height:12.75pt" height=17> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;height:12.75pt;background-color:transparent" height=17><font size=2>Broker:Conversation</font></td> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent" align=right><font size=2>24</font></td> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>CONVERSING</font></td> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>6 - Received Sequenced Message</font></td></tr> <tr style="height:12.75pt" height=17> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;height:12.75pt;background-color:transparent" height=17><font size=2>Broker:Activation</font></td> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent" align=right><font size=2>24</font></td> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2></font></td> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>1 - Start</font></td></tr> <tr style="height:12.75pt" height=17> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;height:12.75pt;background-color:transparent" height=17><font size=2>Broker:Conversation</font></td> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent" align=right><font size=2>24</font></td> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>CONVERSING</font></td> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>1 - SEND Message</font></td></tr> <tr style="height:12.75pt" height=17> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;height:12.75pt;background-color:transparent" height=17><font size=2>Broker:Message Classify</font></td> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent" align=right><font size=2>24</font></td> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><span style=""><font size=2> </font></span></td> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>1 - Local</font></td></tr> <tr style="height:12.75pt" height=17> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;height:12.75pt;background-color:transparent" height=17><font size=2>Broker:Conversation</font></td> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent" align=right><font size=2>23</font></td> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>CONVERSING</font></td> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>6 - Received Sequenced Message</font></td></tr> <tr style="height:12.75pt" height=17> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;height:12.75pt;background-color:transparent" height=17><font size=2>Broker:Activation</font></td> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent" align=right><font size=2>23</font></td> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2></font></td> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>1 - Start</font></td></tr> <tr style="height:12.75pt" height=17> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;height:12.75pt;background-color:transparent" height=17><font size=2>Broker:Conversation</font></td> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent" align=right><font size=2>23</font></td> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>DISCONNECTED_OUTBOUND</font></td> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>2 - END CONVERSATION</font></td></tr> <tr style="height:12.75pt" height=17> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;height:12.75pt;background-color:transparent" height=17><font size=2>Broker:Conversation Group</font></td> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent" align=right><font size=2>23</font></td> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2></font></td> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>2 - Drop</font></td></tr> <tr style="height:12.75pt" height=17> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;height:12.75pt;background-color:transparent" height=17><font size=2>Broker:Message Classify</font></td> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent" align=right><font size=2>23</font></td> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><span style=""><font size=2> </font></span></td> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>1 - Local</font></td></tr> <tr style="height:12.75pt" height=17> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;height:12.75pt;background-color:transparent" height=17><font size=2>Broker:Conversation</font></td> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent" align=right><font size=2>24</font></td> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>DISCONNECTED_INBOUND</font></td> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>7 - Received END CONVERSATION</font></td></tr> <tr style="height:12.75pt" height=17> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;height:12.75pt;background-color:transparent" height=17><font size=2>Broker:Conversation</font></td> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent" align=right><font size=2>23</font></td> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>CLOSED</font></td> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>10 - Received END CONVERSATION Ack</font></td></tr> <tr style="height:12.75pt" height=17> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;height:12.75pt;background-color:transparent" height=17><font size=2>Broker:Conversation</font></td> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent" align=right><font size=2>24</font></td> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>CLOSED</font></td> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>2 - END CONVERSATION</font></td></tr> <tr style="height:12.75pt" height=17> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;height:12.75pt;background-color:transparent" height=17><font size=2>Broker:Conversation Group</font></td> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent" align=right><font size=2>24</font></td> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2></font></td> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>2 - Drop</font></td></tr> <tr style="height:12.75pt" height=17> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;height:12.75pt;background-color:transparent" height=17><font size=2>Broker:Activation</font></td> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent" align=right><font size=2>23</font></td> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2></font></td> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>2 - Ended</font></td></tr> <tr style="height:12.75pt" height=17> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;height:12.75pt;background-color:transparent" height=17><font size=2>Broker:Activation</font></td> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent" align=right><font size=2>24</font></td> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2></font></td> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>2 - Ended</font></td></tr></tbody></table></p> <p>Here are the typical records in the target sys.conversation_endpoints.  These records never disappear:</p> <p> <table style="width:684pt;border-collapse:collapse" cellspacing=0 cellpadding=0 width=911 border=0> <colgroup> <col style="width:179pt" width=238> <col style="width:251pt" width=335> <col style="width:254pt" width=338> <tbody> <tr style="height:12.75pt" height=17> <td style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;width:179pt;border-bottom:#ece9d8;height:12.75pt;background-color:transparent" width=238 height=17></td> <td class=xl24 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;width:251pt;border-bottom:#ece9d8;background-color:transparent" width=335><font size=2><strong>Normal</strong></font></td> <td class=xl24 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;width:254pt;border-bottom:#ece9d8;background-color:transparent" width=338><font size=2><strong>With Error</strong></font></td></tr> <tr style="height:12.75pt" height=17> <td class=xl27 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;height:12.75pt;background-color:transparent" height=17><strong><font size=2>conversation_handle</font></strong></td> <td class=xl25 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>3FE27EE5-1E86-DB11-B009-000BDB714730</font></td> <td class=xl25 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>53E17EE5-1E86-DB11-B009-000BDB714730</font></td></tr> <tr style="height:12.75pt" height=17> <td class=xl27 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;height:12.75pt;background-color:transparent" height=17><strong><font size=2>conversation_id</font></strong></td> <td class=xl25 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>0A432392-55F5-461B-87D5-0058795BC3AE</font></td> <td class=xl25 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>BCCDFA85-86A3-43B8-9648-24FFE5C0ED3F</font></td></tr> <tr style="height:12.75pt" height=17> <td class=xl27 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;height:12.75pt;background-color:transparent" height=17><strong><font size=2>is_initiator</font></strong></td> <td class=xl25 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>0</font></td> <td class=xl25 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>0</font></td></tr> <tr style="height:12.75pt" height=17> <td class=xl27 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;height:12.75pt;background-color:transparent" height=17><strong><font size=2>service_contract_id</font></strong></td> <td class=xl25 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>0</font></td> <td class=xl25 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>0</font></td></tr> <tr style="height:12.75pt" height=17> <td class=xl27 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;height:12.75pt;background-color:transparent" height=17><strong><font size=2>conversation_group_id</font></strong></td> <td class=xl25 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>00000000-0000-0000-0000-000000000000</font></td> <td class=xl25 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>00000000-0000-0000-0000-000000000000</font></td></tr> <tr style="height:12.75pt" height=17> <td class=xl27 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;height:12.75pt;background-color:transparent" height=17><strong><font size=2>service_id</font></strong></td> <td class=xl25 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>0</font></td> <td class=xl25 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>0</font></td></tr> <tr style="height:12.75pt" height=17> <td class=xl27 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;height:12.75pt;background-color:transparent" height=17><strong><font size=2>lifetime</font></strong></td> <td class=xl28 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>2074-12-25 21:29:28.640</font></td> <td class=xl28 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>2074-12-25 21:29:28.000</font></td></tr> <tr style="height:12.75pt" height=17> <td class=xl27 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;height:12.75pt;background-color:transparent" height=17><strong><font size=2>state</font></strong></td> <td class=xl25 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>CD</font></td> <td class=xl25 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>CD</font></td></tr> <tr style="height:12.75pt" height=17> <td class=xl27 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;height:12.75pt;background-color:transparent" height=17><strong><font size=2>state_desc</font></strong></td> <td class=xl25 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>CLOSED</font></td> <td class=xl25 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>CLOSED</font></td></tr> <tr style="height:12.75pt" height=17> <td class=xl27 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;height:12.75pt;background-color:transparent" height=17><strong><font size=2>far_service</font></strong></td> <td class=xl26 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><a title="http://my.domain.com/schemas/test/Initiator/2006-12-07" href="http://my.domain.com/schemas/test/Initiator/2006-12-07"><font color="#0000ff" size=2><u>http://my.domain.com/schemas/test/Initiator/2006-12-07</u></font></a></td> <td class=xl26 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><a title="http://my.domain.com/schemas/test/Initiator/2006-12-07" href="http://my.domain.com/schemas/test/Initiator/2006-12-07"><u><font color="#0000ff" size=2>http://my.domain.com/schemas/test/Initiator/2006-12-07</font></u></a></td></tr> <tr style="height:12.75pt" height=17> <td class=xl27 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;height:12.75pt;background-color:transparent" height=17><strong><font size=2>far_broker_instance</font></strong></td> <td class=xl25 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>227D0898-0399-40E0-954B-C8B685EE415A</font></td> <td class=xl25 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>227D0898-0399-40E0-954B-C8B685EE415A</font></td></tr> <tr style="height:12.75pt" height=17> <td class=xl27 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;height:12.75pt;background-color:transparent" height=17><strong><font size=2>principal_id</font></strong></td> <td class=xl25 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>5</font></td> <td class=xl25 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>5</font></td></tr> <tr style="height:12.75pt" height=17> <td class=xl27 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;height:12.75pt;background-color:transparent" height=17><strong><font size=2>far_principal_id</font></strong></td> <td class=xl25 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>6</font></td> <td class=xl25 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>6</font></td></tr> <tr style="height:12.75pt" height=17> <td class=xl27 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;height:12.75pt;background-color:transparent" height=17><strong><font size=2>outbound_session_key_identifier</font></strong></td> <td class=xl25 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>DEBEB4DB-D186-410B-9555-A34F8F5C9FE2</font></td> <td class=xl25 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>B82BB074-5AE5-4164-9D0B-53E364B0B52B</font></td></tr> <tr style="height:12.75pt" height=17> <td class=xl27 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;height:12.75pt;background-color:transparent" height=17><strong><font size=2>inbound_session_key_identifier</font></strong></td> <td class=xl25 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>1DBAE307-5DFF-4050-9D94-71003D8BD058</font></td> <td class=xl25 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>57B5C7D8-9E8B-4614-9325-5AA30AED3670</font></td></tr> <tr style="height:12.75pt" height=17> <td class=xl27 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;height:12.75pt;background-color:transparent" height=17><strong><font size=2>security_timestamp</font></strong></td> <td class=xl28 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>2006-12-07 18:45:52.763</font></td> <td class=xl28 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>1900-01-01 00:00:00.000</font></td></tr> <tr style="height:12.75pt" height=17> <td class=xl27 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;height:12.75pt;background-color:transparent" height=17><strong><font size=2>dialog_timer</font></strong></td> <td class=xl28 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>1900-01-01 00:00:00.000</font></td> <td class=xl28 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>1900-01-01 00:00:00.000</font></td></tr> <tr style="height:12.75pt" height=17> <td class=xl27 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;height:12.75pt;background-color:transparent" height=17><strong><font size=2>send_sequence</font></strong></td> <td class=xl25 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>1</font></td> <td class=xl25 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>1</font></td></tr> <tr style="height:12.75pt" height=17> <td class=xl27 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;height:12.75pt;background-color:transparent" height=17><strong><font size=2>last_send_tran_id</font></strong></td> <td class=xl25 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>0x550800000000</font></td> <td class=xl25 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>0x700700000000</font></td></tr> <tr style="height:12.75pt" height=17> <td class=xl27 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;height:12.75pt;background-color:transparent" height=17><strong><font size=2>end_dialog_sequence</font></strong></td> <td class=xl25 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>-1</font></td> <td class=xl25 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>1</font></td></tr> <tr style="height:12.75pt" height=17> <td class=xl27 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;height:12.75pt;background-color:transparent" height=17><strong><font size=2>receive_sequence</font></strong></td> <td class=xl25 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>2</font></td> <td class=xl25 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>1</font></td></tr> <tr style="height:12.75pt" height=17> <td class=xl27 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;height:12.75pt;background-color:transparent" height=17><strong><font size=2>receive_sequence_frag</font></strong></td> <td class=xl25 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>0</font></td> <td class=xl25 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>0</font></td></tr> <tr style="height:12.75pt" height=17> <td class=xl27 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;height:12.75pt;background-color:transparent" height=17><strong><font size=2>system_sequence</font></strong></td> <td class=xl25 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>0</font></td> <td class=xl25 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>0</font></td></tr> <tr style="height:12.75pt" height=17> <td class=xl27 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;height:12.75pt;background-color:transparent" height=17><strong><font size=2>first_out_of_order_sequence</font></strong></td> <td class=xl25 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>-1</font></td> <td class=xl25 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>-1</font></td></tr> <tr style="height:12.75pt" height=17> <td class=xl27 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;height:12.75pt;background-color:transparent" height=17><strong><font size=2>last_out_of_order_sequence</font></strong></td> <td class=xl25 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>0</font></td> <td class=xl25 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>0</font></td></tr> <tr style="height:12.75pt" height=17> <td class=xl27 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;height:12.75pt;background-color:transparent" height=17><strong><font size=2>last_out_of_order_frag</font></strong></td> <td class=xl25 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>0</font></td> <td class=xl25 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>0</font></td></tr> <tr style="height:12.75pt" height=17> <td class=xl27 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;height:12.75pt;background-color:transparent" height=17><strong><font size=2>is_system</font></strong></td> <td class=xl25 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>0</font></td> <td class=xl25 style="border-right:#ece9d8;border-top:#ece9d8;border-left:#ece9d8;border-bottom:#ece9d8;background-color:transparent"><font size=2>0</font></td></tr></tbody></table></p> <p> </p>Thu, 07 Dec 2006 19:01:50 Z2009-11-11T20:47:18Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/9acc74a9-1f1e-4b4d-9180-322ddcf6bf1dhttp://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/9acc74a9-1f1e-4b4d-9180-322ddcf6bf1dML90http://social.msdn.microsoft.com/Profile/en-US/?user=ML90Service Broker Eventdata() store xmlI'm using service broker to send messages across multiple databases on many servers to one &quot;central&quot; database that will be recording any changes made(triggers/functs/procs/views/ and tables).  Tables is giving me a hard time because SMO is not compatible with CLR.  The way my project is working is that everytime a change is made, a ddl trigger will fire and service broker will send everything to a row in table in the central database using EVENTDATA().  From this table, it is being scripted out using a CLR and then written to file.  <br/><br/>For tables, I am not using SMO.  I have a UDF that will allow me to get the full script of the table after the ddl is fired. Now I'm having issues with sending this message from the &quot;child&quot; server to the &quot;master&quot; server.  My UDF returns the script of the table as an xml with the 'drops' and 'creates'.  I was thinking to store this xml into a variable within EVENTDATA() before sending it to the master server using service broker.  This way everything is still available(login time, name, etc)within the message after it has reached the master database.  How can this be done?<br/><br/>Also, are function calls allowed in a stored procedure?  <br/><br/>Thanks in advance for any assistance or comments.Fri, 06 Nov 2009 04:07:31 Z2009-11-12T03:03:47Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/50e84d45-bf83-4384-9274-733ef328c847http://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/50e84d45-bf83-4384-9274-733ef328c847PMBThttp://social.msdn.microsoft.com/Profile/en-US/?user=PMBTQuery NotificationsHi,<br/><br/>I am new to Query notifications. Studying the literature, I can not figure out the connection between<br/>ContactChangeMessages and ContactChangeNotifications on the one hand in <br/>ms-help://MS.VSCC.v90/MS.MSDNQTR.v90.en/wd_adonet/html/a5333e19-8e55-4aa9-82dc-ca8745e516ed.htm<br/><br/>AND<br/><br/>Example in <br/>ms-help://MS.VSCC.v90/MS.MSDNQTR.v90.en/wd_adonet/html/88bf9b56-5769-4595-98c4-80285d812a5e.htm<br/><br/>Nowhere in the example are the service broker queue and / or service broker service from the top of this page mentioned.<br/><br/>Where is the connection?<br/><br/>Thanks in advance!Wed, 04 Nov 2009 18:47:09 Z2009-11-10T04:19:04Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/c4349b7b-2380-4c6a-b014-30e156fb03d7http://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/c4349b7b-2380-4c6a-b014-30e156fb03d7Smudger33http://social.msdn.microsoft.com/Profile/en-US/?user=Smudger33SQL2005 Service Broker on 64bit active/passive cluster & .Net Framework 3.5sp1Hi <br/>We are currently running Service Broker on one of our SQL2005 64bit Enterprise servers. We recently upgraded some 3rd party software which has s SQL backend database and one of the requirements was for .Net Framework 3.5sp1 to be installed on both nodes of the SQL cluster.  Being cautious about what impact this would have, we installed it on our passive node and failed over.  However over a 12 hour period we then hit some problems with messages queues on our Service Broker application.  We assumed these were related to the .Net Framework 3.5sp1 install, so failed back to our node without this and all has been working well for 72hours.  <br/><br/>So I'm trying to establish if there are any known issues installing .Net Framework 3.5sp1 on a SQL2005 bit cluster. Or if anyone has experience similair problems.  It could just be a coincidence we had issues, or there is something else on the passive node that was causing the problem.<br/><br/>Many Thanks in advance.<br/>DarrenTue, 27 Oct 2009 13:19:41 Z2009-11-06T18:00:16Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/d5ec6743-634b-40da-8dba-cd999515a5b2http://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/d5ec6743-634b-40da-8dba-cd999515a5b2jcp169http://social.msdn.microsoft.com/Profile/en-US/?user=jcp169WAITFOR in External activator does not allow to shrink logfileI am using External activator to notify that a message is available in the Queue to process. My External app picks up the message and process it successfully. Everything works fine.<br><br>The issue is that due to the WAITFOR that is indefinate (without timeout) in the activator, I am not able to shrink log file.<br>I backed up my database and ran Shrink database using SSMS. The log file did not shirnk. So I tried <br><font size=3> <p></font><font style="font-size:10px"><font style="font-size:11px"><font style="font-size:11px" color="#0000ff"><font style="font-size:11px" color="#0000ff">DBCC</font></font><font style="font-size:11px"> SHRINKFILE</font><font style="font-size:11px" color="#808080"><font style="font-size:11px" color="#808080">(</font></font><font style="font-size:11px">db_Log</font><font style="font-size:11px" color="#808080"><font style="font-size:11px" color="#808080">,</font></font><font style="font-size:11px"> 1</font><font style="font-size:11px" color="#808080"><font style="font-size:11px" color="#808080">)<br></font></font></font></font><font style="font-size:10px"><font style="font-size:11px"><font style="font-size:11px" color="#0000ff"><font style="font-size:11px" color="#0000ff">BACKUP</font></font> <font style="font-size:11px" color="#ff00ff"><font style="font-size:11px" color="#ff00ff">LOG</font></font><font style="font-size:11px"> xw1_1_Core </font><font style="font-size:11px" color="#0000ff"><font style="font-size:11px" color="#0000ff">WITH</font></font> <font style="font-size:11px" color="#0000ff"><font style="font-size:11px" color="#0000ff">TRUNCATE_ONLY<br></font></font></font></font><font style="font-size:10px"><font style="font-size:11px"><font style="font-size:11px" color="#0000ff"><font style="font-size:11px" color="#0000ff">DBCC</font></font><font style="font-size:11px"> SHRINKFILE</font><font style="font-size:11px" color="#808080"><font style="font-size:11px" color="#808080">(</font></font><font style="font-size:11px">db_Log</font><font style="font-size:11px" color="#808080"><font style="font-size:11px" color="#808080">,</font></font><font style="font-size:11px"> 1</font><font style="font-size:11px" color="#808080"><font style="font-size:11px" color="#808080">)<br><font style="font-size:10px"><font style="font-size:11px"><font style="font-size:11px" color="#808080"><font style="font-size:11px" color="#808080"></font></font></font></font><font style="font-size:12px"><br><font style="font-size:12px" color="#000000">But could not shrink the file. <br></font></font><font style="font-size:12px"><font color="#000000">I think the reason is because of the <font style="font-size:12px"><strong><font style="font-size:12px">log_reuse_wait</font><font style="font-size:12px"><font style="font-size:12px">,</font></font></strong></font></font></font><font color="#000000"><font size=3><font style="font-size:12px"><strong> log_reuse_wait_desc</strong> in <strong>sys.databases</strong> is set to 4 (ACTIVE_TRANSACTION), and that's due to <font size=2>the active transaction by </font>WAITFOR in Activator.<br></font></font><br><font style="font-size:12px">Has anyone come across similar problem and if anyone has a solution or suggest a solution to </font><font style="font-size:12px">shrink the file. I would prefer that I <font style="font-size:12px">don't have to stop the</font></font><font style="font-size:12px"> Activator service (i mean WAITFOR).<br><br>Not sure whether this question belong to Service broker or SQL server engine.<br><br>thanks in advance.</font></font></p></font></font></font></font>Mon, 12 Jan 2009 22:12:35 Z2009-11-04T17:28:21Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/cdedfa58-8952-45b4-85aa-de331166fc27http://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/cdedfa58-8952-45b4-85aa-de331166fc27Awan 83http://social.msdn.microsoft.com/Profile/en-US/?user=Awan%2083How to Pass Message From Service Broker to Custom Windows Service ApplicationHi,<br><br>Is it possible to send message to a custom developed windows service using service broker message queues?<br><br>Scenario is that I want to notifiy my windows service (devleoped in c#) when ever a new record is inserted into the database.<br><br>Is the Service Broker's Message Queue available outside the Database say in a windows service?<br><br> <hr class=sig>ARaheem AwanTue, 10 Feb 2009 11:11:54 Z2009-11-03T17:46:01Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/e7786e1f-30eb-4fed-befe-8a12d7f7587ahttp://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/e7786e1f-30eb-4fed-befe-8a12d7f7587aMark Shoemakerhttp://social.msdn.microsoft.com/Profile/en-US/?user=Mark%20ShoemakerConversation Group LockingHello,<br/> <br/> I have a conversation group which contains a conversation identified by conversation handle @ch, <br/> <br/> In one process,  I do a <br/> <br/> <pre>RECEIVE ...</pre> <br/> , thereby locking the conversation group until the transaction is committed.<br/> <br/> What happens if, in a separate process, I try to do a <br/> <pre>SEND ON CONVERSATION @ch</pre> while the conversation group is still locked?<br/> <br/> Does it raise an error, or does it just assign a new conversation group, or does it do something else?<br/> <br/> Thanks,<br/> MarkThu, 29 Oct 2009 17:18:33 Z2009-11-04T04:29:26Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/99321f54-1fef-4860-9fe9-5966a46fe582http://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/99321f54-1fef-4860-9fe9-5966a46fe582ebucishttp://social.msdn.microsoft.com/Profile/en-US/?user=ebucisOnce for all right permissions for SQLDependency PLEASE?I took this description out of my search engine because it is exactly what is happening to us, so why bother writing it again.<br/> <br/> The original post is unanswered here (http://www.devnewsgroups.net/group/microsoft.public.dotnet.framework.adonet/topic30682.aspx)<br/> <br/> <strong> but I hope that it will be solved here.</strong> <br/> <br/> The blog entry posted by Sushil Chordia at<br/> <a href="http://blogs.msdn.com/dataaccess/archive/2005/09/27/474447.aspx">http://blogs.msdn.com/dataaccess/archive/2005/09/27/474447.aspx</a> describes <br/> the minimum requirements a Sql user should have for SqlDependency to work. I <br/> have tried to apply them, but I still have some problems.<br/> <br/> I am trying to create an Application Role in Sql Server 2005 RTM that <br/> contains all the necessary rights for SqlDependency to work. I'm doing this <br/> based on the information specified in the blog mentioned earlier.<br/> <br/> Here's the script that creates a test-databases and the application-role:<br/> CREATE DATABASE [TestDb] ON  PRIMARY <br/> ( NAME = N'TestDb', FILENAME = N'C:\Program Files\Microsoft SQL <br/> Server\MSSQL.1\MSSQL\DATA\TestDb.mdf' , SIZE = 3072KB , MAXSIZE = UNLIMITED, <br/> FILEGROWTH = 1024KB )<br/> LOG ON <br/> ( NAME = N'TestDb_log', FILENAME = N'C:\Program Files\Microsoft SQL <br/> Server\MSSQL.1\MSSQL\DATA\TestDb_log.ldf' , SIZE = 1024KB , MAXSIZE = 2048GB <br/> , FILEGROWTH = 10%)<br/> COLLATE Latin1_General_CI_AI<br/> GO<br/> <br/> USE TestDb<br/> GO<br/> <br/> CREATE TABLE [dbo].[tblPRODUCTS](ID INT NOT NULL, strNAME NVARCHAR(50) NOT <br/> NULL)<br/> GO<br/> <br/> CREATE LOGIN [test] WITH PASSWORD=N'test', DEFAULT_DATABASE=[TestDb], <br/> DEFAULT_LANGUAGE=[us_english], CHECK_EXPIRATION=OFF, CHECK_POLICY=OFF<br/> GO<br/> <br/> CREATE USER [test] FOR LOGIN [test] <br/> GO<br/> <br/> EXEC sp_addrole 'sql_dependency_subscriber'<br/> GO<br/> <br/> CREATE ROLE [sqldependency_user]<br/> GO<br/> <br/> GRANT CREATE PROCEDURE to [sqldependency_user]<br/> GRANT CREATE QUEUE to [sqldependency_user]<br/> GRANT CREATE SERVICE to [sqldependency_user]<br/> GRANT REFERENCES on <br/> CONTRACT::[<a href="http://schemas.microsoft.com/SQL/Notifications/PostQueryNotification">http://schemas.microsoft.com/SQL/Notifications/PostQueryNotification</a> ] to [sqldependency_user]<br/> GRANT VIEW DEFINITION TO [sqldependency_user]<br/> GRANT SELECT to [sqldependency_user]<br/> GRANT SUBSCRIBE QUERY NOTIFICATIONS TO [sqldependency_user]<br/> GRANT RECEIVE ON QueryNotificationErrorsQueue TO [sqldependency_user]<br/> GRANT REFERENCES on <br/> CONTRACT::[<a href="http://schemas.microsoft.com/SQL/Notifications/PostQueryNotification">http://schemas.microsoft.com/SQL/Notifications/PostQueryNotification</a> ] to [sqldependency_user]<br/> <br/> EXEC sp_addrolemember 'sql_dependency_subscriber', 'test'<br/> EXEC sp_addrolemember 'sqldependency_user', 'test'<br/> GO<br/> <br/> I have also written the following C# program that should work at this point <br/> if I interpret that blog-entry correctly.<br/>   class Program<br/>   {<br/>     private static string mConnectionString = &quot;Data <br/> Source=(local);Database=TestDb;Persist Security Info=false;Integrated <br/> Security=false;User Id=test;Password=test&quot;;<br/> <br/>     static void Main(string[] args)<br/>     {<br/>       using (SqlConnection oConnection = new SqlConnection(mConnectionString))<br/>       {<br/>         oConnection.Open();<br/> <br/>         SqlDependency.Start(mConnectionString);<br/> <br/>         ' there's some more code here...<br/>       }<br/>     }<br/>   }<br/> <br/> <br/> However, if I now run this program, I get the following exception on <br/> SqlDependency.Start:<br/> Unhandled Exception: System.Data.SqlClient.SqlException: The specified <br/> schema name &quot;dbo&quot; either does<br/> not exist or you do not have permission to use it.<br/> <br/> I partially resolved this problem by doing the following:<br/> GRANT CONTROL ON SCHEMA::[dbo] TO [adam_service_user]<br/> <br/> However, when I run the application again, it now fails with the following <br/> error on SqlDependency.Start:<br/> Unhandled Exception: System.Data.SqlClient.SqlException: Cannot find the <br/> user 'owner', because it do<br/> es not exist or you do not have permission.<br/> Cannot find the queue <br/> 'SqlQueryNotificationService-653e2c6f-51ff-488e-bca6-71be01a02206', because it<br/> does not exist or you do not have permission.<br/> Cannot find the service <br/> 'SqlQueryNotificationService-653e2c6f-51ff-488e-bca6-71be01a02206', because<br/> it does not exist or you do not have permission.<br/> Invalid object name <br/> 'SqlQueryNotificationService-653e2c6f-51ff-488e-bca6-71be01a02206'.<br/> <br/> Apparently, there's still some additional permission required to use <br/> SqlDependency that is not listed in Sushil's blog. I can bypass this problem <br/> by making my role a member of the dbo-role, but I would like to know the <br/> minimum role required to make this thing work.Fri, 30 Oct 2009 15:53:41 Z2009-11-05T04:11:16Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/d92f653a-e13b-4ee5-b22f-76fc7ab940eahttp://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/d92f653a-e13b-4ee5-b22f-76fc7ab940eaalagsamhttp://social.msdn.microsoft.com/Profile/en-US/?user=alagsamThe activated proc [].[SqlQueryNotificationStoredProcedure-c885a8fb-dc38-4c3d-806f-dd26467d9269] running on queue [dbname].Hi <br/> Ive been working with one of our developers to setup QN by following the instructions on [http://www.code-magazine.com/articleprint.aspx?quickid=0605061&amp;printmode=true]<br/> He couldnt get the subscriptions to work and prompted me to have a look through the setup <br/> Ive noticed that my errorlog is getting filled with the following msgs<br/> <br/> The activated proc [XXX\XXXX].[SqlQueryNotificationStoredProcedure-c885a8fb-dc38-4c3d-806f-dd26467d9269] running on queue XXXXX.XXXX\XXXXX.SqlQueryNotificationService-c885a8fb-dc38-4c3d-806f-dd26467d9269 output the following:  'The activated proc [XXXX\XXXXX].[SqlQueryNotificationStoredProcedure-c885a8fb-dc38-4c3d-806f-dd26467d9269] running on queue XXXX\XXXXX.SqlQueryNotificationService-c885a8fb-dc38-4c3d-806f-dd26467d9269 output the following:  'Could not obtain information about Windows NT group/user 'XXXX\XXXXX', error code 0x5.<br/> <br/> If I run <br/> <br/> <br/> SELECT q.name, m.state, m.last_empty_rowset_time, m.tasks_waiting<br/> FROM   sys.dm_broker_queue_monitors m<br/> JOIN   sys.service_queues q<br/> ON            m.queue_id = q.object_id <br/> <br/> I get the following <br/> <br/> name    state    last_empty_rowset_time    tasks_waiting<br/> SqlQueryNotificationService-c885a8fb-dc38-4c3d-806f-dd26467d9269    INACTIVE    2009-10-30 16:58:23.510    0<br/> SqlQueryNotificationService-5ab3904a-35db-4809-b332-137d3ecc0313    INACTIVE    2009-10-30 17:00:21.293    0<br/> SqlQueryNotificationService-3060d8d1-a0fd-4783-a563-f016d144c7a1    INACTIVE    2009-10-30 17:00:48.937    0<br/> SqlQueryNotificationService-d4be153d-cc34-4bd0-9ad0-26b333d0c21a    INACTIVE    2009-10-30 17:05:09.647    0<br/> SqlQueryNotificationService-1e369bd6-2497-446e-b0c2-8049facea96f    INACTIVE    2009-10-30 17:07:58.697    0<br/> <br/> Tried most suggestions posted on this forum but hasnt worked, even droped the database and recreated but these msgs are still filling up the errorlog.<br/> <br/> <br/> Apprecitate if someone can assist<br/> <br/> We simply want to remove the msgs that are coming out.<br/> <br/> thank youFri, 30 Oct 2009 18:19:54 Z2009-10-31T17:24:29Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/60132569-aecb-4dcf-b4be-2256178ad32bhttp://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/60132569-aecb-4dcf-b4be-2256178ad32bNathan Blevinshttp://social.msdn.microsoft.com/Profile/en-US/?user=Nathan%20BlevinsSQL Query Notifications and GetDate()<div class=post-text> <p>I am currently working on a query that is registered for Query Notifications. In accordance w/ the rules of Notification Services, I can only use Deterministic functions in my queries set up for subscription. However, GetDate() (and almost any other means that I can think of) are non-deterministic. Whenever I pull my data, I would like to be able to limit the result set to only relevant records, which is determined by the current day.</p> <p>Does anyone know of a work around that I could use that would allow me to use the current date to filter my results but not invalidate the query for query notifications?</p> <p>Example Code:</p> <p> <pre lang=x-sql>SELECT fcDate as RecordDate, fcYear as FiscalYear, fcPeriod as FiscalPeriod, fcFiscalWeek as FiscalWeek, fcIsPeriodEndDate as IsPeriodEnd, fcPeriodWeek as WeekOfPeriod FROM dbo.bFiscalCalendar WHERE fcDate &gt;= GetDate() -- This line invalidates the query for notification...</pre> </p> <p>Other thoughts:</p> <p>We have an application controls table in our database that we use to store application level settings. I had thought to write a small script that keeps a record up to date w/ teh current smalldatetime. However, my join to this table is failing for notificaiton as well and I am not sure why. I surmise that it has something to do w/ me specifitying a text type (the column name), which is frustrating.</p> <p>Example Code 2:</p> <p> <pre lang=x-sql>SELECT fcDate as RecordDate, fcYear as FiscalYear, fcPeriod as FiscalPeriod, fcFiscalWeek as FiscalWeek, fcIsPeriodEndDate as IsPeriodEnd, fcPeriodWeek as WeekOfPeriod FROM dbo.bFiscalCalendar INNER JOIN dbo.xApplicationControls ON fcDate &gt;= acValue AND acName = N'Cache_CurrentDate' </pre> </p> <p>Does anyone have any suggestions?</p> <p>EDIT: Here is a <a rel=nofollow href="http://msdn.microsoft.com/en-us/library/ms181122.aspx">link on MSDN</a> that gives the rules for Notification Services</p> </div> <hr class=sig> Database EngineerFri, 30 Oct 2009 13:05:53 Z2009-11-05T04:10:03Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/73c46101-769f-4c67-a2a2-c9b61489e35ahttp://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/73c46101-769f-4c67-a2a2-c9b61489e35adebuginghttp://social.msdn.microsoft.com/Profile/en-US/?user=debugingSQL Service Broker Problem with date<p style="margin:0in 0in 0pt;direction:ltr;line-height:150%;unicode-bidi:embed;text-align:left"><span style="font-size:9.5pt;color:#080808;line-height:150%;font-family:Verdana">Hi All</span> <br></p> <p style="margin:0in 0in 0pt;direction:ltr;line-height:150%;unicode-bidi:embed;text-align:left"><span style="font-size:9.5pt;color:#080808;line-height:150%;font-family:Verdana"><br>I use the SQL Service Broker to notify me when a row is inserted in a SQL table.</span> </p> <p style="margin:0in 0in 0pt;direction:ltr;line-height:150%;unicode-bidi:embed;text-align:left"><span style="font-size:9.5pt;color:#080808;line-height:150%;font-family:Verdana">The SqlDependency command text as follwing</span> </p> <p style="margin:0in 0in 0pt;direction:ltr;line-height:150%;unicode-bidi:embed;text-align:left"><span style="font-size:10pt;color:blue;line-height:150%;font-family:'Courier New'">SELECT</span> <span style="font-size:10pt;color:black;line-height:150%;font-family:'Courier New'">Email</span> <span style="font-size:10pt;color:blue;line-height:150%;font-family:'Courier New'">from</span> <span style="font-size:10pt;color:black;line-height:150%;font-family:'Courier New'">dbo.CEM</span> <span style="font-size:10pt;color:blue;line-height:150%;font-family:'Courier New'">where</span> <span style="font-size:10pt;color:black;line-height:150%;font-family:'Courier New'">Date_CEM</span> <span style="font-size:10pt;color:gray;line-height:150%;font-family:'Courier New'">=</span> <span style="font-size:10pt;color:red;line-height:150%;font-family:'Courier New'">'1/20/2008 12:00:00 AM'</span></p> <p style="margin:0in 0in 0pt;direction:ltr;line-height:150%;unicode-bidi:embed;text-align:left"><span style="font-size:9.5pt;color:#080808;line-height:150%;font-family:Verdana">As you see there is a column its datatype is datetime (</span><span style="font-size:10pt;color:maroon;line-height:150%;font-family:'Courier New'">Date_CEM</span><span style="font-size:9.5pt;color:#080808;line-height:150%;font-family:Verdana">), when I am using a select statement same as shown I am having a problem, which is : SqlDependency onchange event is invoked continuously and cannot be stopped wherever the value of the Email column is changed or not, but when I tried to use another select statement that not contains a datetime column in the condition the event is invoked correctly (only when the value is changed of the </span><span style="font-size:10pt;color:maroon;line-height:150%;font-family:'Courier New'">Email column</span><span style="font-size:9.5pt;color:#080808;line-height:150%;font-family:Verdana">)<br><br>Can anybody help me</span> </p>Thu, 26 Mar 2009 14:40:01 Z2009-10-30T12:51:37Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/1643d7ca-c301-47b9-a624-7bf55bc10885http://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/1643d7ca-c301-47b9-a624-7bf55bc10885RenatoFonteshttp://social.msdn.microsoft.com/Profile/en-US/?user=RenatoFontesMessage not being sent while auto activating a procedure from a queueSo...<br/> I have a queue that activates a procedure when in it receives a message.<br/> This procedures (let's call it procedure A) calls another procedure (let's call it B)<br/> procedure B function is to log the activity of procedure A in another queue<br/> <br/> the problem is... that process B isn't logging anything in the queue...<br/> if I call procedure B by itself it does work like it should...<br/> and if I take the code from procedure B and put in A... it also work (but I shouldn't do it this way)<br/> <br/> <br/> So what's going on?<br/> Is there a problem when an autoactivating procedure calls another?<br/> <br/> BTW this is on sql 2005<br/> <br/> Thanks,<br/> Renato FontesThu, 29 Oct 2009 08:11:34 Z2009-10-30T10:59:27Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/aae1f10a-795e-409f-b09e-918c8d71f075http://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/aae1f10a-795e-409f-b09e-918c8d71f075furious_vibeshttp://social.msdn.microsoft.com/Profile/en-US/?user=furious_vibesSqlDependency not registering subscriptions only with MY databaseHi,<br/> <br/> I have been trying to use the SqlDependency class to register a subscription with my SQL database from .Net code. I have ensure that my login has all of the required permissions and that my DB has the Service Broker enabled. When my code runs, a new Queue and Service are created, but no subscription is registered (i.e. nothing new shows up in sys.dm_qn_subscriptions).<br/> <br/> Out of desperation, I tried set up AdventureWorks and created the project detailed in the MSDN article 'Using SQLDependency in a Windows Application' (http://msdn.microsoft.com/en-us/library/a52dhwx7%28VS.80%29.aspx) and it works! However, when I modify the connection string to connect to my database, and change the SELECT statement to pull something from one of my tables, the data is retrieved but no subscription is registered!<br/> <br/> This is driving me crazy. From my debugging, I have concluded that the problem must be something with my database, but i can't figure it out for the life of me.<br/> <br/> My SQL Server is local and I am sa. I am using stock .Net front-end code : SqlDependency with the SqlCommand class.<br/> <br/> Does anybody have any ideas? <br/> <br/> Thanks in advance,<br/> <br/> ChrisWed, 28 Oct 2009 16:05:21 Z2009-10-29T17:49:37Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/e5065b77-8b48-4ddb-a2b0-d7491a6f48bchttp://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/e5065b77-8b48-4ddb-a2b0-d7491a6f48bcrs456http://social.msdn.microsoft.com/Profile/en-US/?user=rs456 dependencies for the bulk inserting process <p>HI All<br/><br/>There are lot of dependencies for the bulk inserting process in oracle like</p> <p>Tablespace <br/>Redo Log Size<br/>Server size<br/>PCT FREE<br/>PCT USED<br/>Log Switches<br/>Undo Retention<br/>Undo Tablespace Size.</p> <p>Undo Size = Undo Retention * DB Block Size * Undo Block Per Sec</p> <p>undo Block Per Sec<br/>SELECT MAX(undoblks/((end_time-begin_time)*3600*24))<br/>      &quot;UNDO_BLOCK_PER_SEC&quot;<br/>  FROM v$undostat; <br/> </p> <p>INITIAL  <br/>INITRANS for the table from 1 to 5.<br/>PCTINCREASE - 0<br/>FREELISTS parameter.  You want to have it set to AT LEAST the number of processes that you believe will be CONCURRENTLY inserting into your table.<br/>multiple database writers (db_writers init.ora parameter), <br/> <br/>PCT_USED is most important if records will ever be deleted from this table.  If you don't plan to allow deletes, then set PCT_USED to a high value (like 80 or 90) but the total of PCT_FREE + PCT_USED must be less than or equal to 100.</p> <p><br/>Locally Managed / Dictionery Managed.<br/><br/><br/>can any one suggest me for sql server...?<br/><br/>please<br/><br/><br/>Regards<br/>Yogananda</p>Mon, 26 Oct 2009 09:28:55 Z2009-10-29T04:15:19Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/dc156735-fe96-47c3-b620-8f8c3b41b335http://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/dc156735-fe96-47c3-b620-8f8c3b41b335RenatoFonteshttp://social.msdn.microsoft.com/Profile/en-US/?user=RenatoFontesIs it possible to send a message from inside a function?I was trying to make a function to log some operations in my database...<br/> The log was going to work by sending message trough the service broker and storing them in a queue.<br/> The problem is that when I tried to make this function I got this error:<br/> <br/> &quot;Invalid use of side-effecting or time-dependent operator in 'BEGIN DIALOG' within a function.&quot;<br/> <br/> So... is there a way to send a message via service broker using functions?<br/> <br/> Thanks for your help,<br/> Renato FontesWed, 28 Oct 2009 14:42:05 Z2009-10-29T07:27:22Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/68e1f395-1633-4fbe-b677-efb32166e46ehttp://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/68e1f395-1633-4fbe-b677-efb32166e46edevdrehttp://social.msdn.microsoft.com/Profile/en-US/?user=devdreSqlDependency works perfect but sometimes...I have a problem with the SqlDependency object.<br/> <br/> It appears to be working for days and suddenly it stops working for some reason. When I restart the NT service which is waiting for the data it works again for days...<br/> <br/> What is the possible reason?<br/> <br/> 1. Running SQL Server 2005 SP2 (Can't install SP3 due to other db's).Wed, 28 Oct 2009 13:10:12 Z2009-11-03T03:03:39Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/eeda76f0-7429-49ca-ac66-375382acd9c4http://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/eeda76f0-7429-49ca-ac66-375382acd9c4shafiqmhttp://social.msdn.microsoft.com/Profile/en-US/?user=shafiqmService Broker and AS400 MQ Series<p>Hi,</p> <p>Does anyone using SQL Server broker to send message to a queue outside SQL Server. I mean to non-SQL environment like AS400 MQ Series.</p> <p> </p> <p>Thanks</p> <p>Shafiq</p>Tue, 13 Feb 2007 16:37:16 Z2009-10-28T17:00:36Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/7e76cb07-eb3b-4bef-8ee4-15ee4c110c44http://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/7e76cb07-eb3b-4bef-8ee4-15ee4c110c44Mark Shoemakerhttp://social.msdn.microsoft.com/Profile/en-US/?user=Mark%20ShoemakerNo enabled application monitor is on behalf of queue...Hello,<br/> <br/> I am trying to set up external activation, and the external application doesn't ever seem to be launched.  I get the following error, which shows up in the EATrace.log:<br/> <br/> <br/> EXCEPTION    ERROR = 32, No enabled application monitor is on behalf of queue [my target queue name].<br/> <br/> <br/> Any ideas where I should be looking to find the source of the problem?  I'm not sure what it means by 'no enabled application monitor...'<br/> <br/> Thanks in advance.<br/> <br/>Tue, 27 Oct 2009 14:17:41 Z2009-11-02T04:28:03Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/6cb75771-5af1-42e7-b536-82370f73c829http://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/6cb75771-5af1-42e7-b536-82370f73c829pjmurrayhttp://social.msdn.microsoft.com/Profile/en-US/?user=pjmurrayService Broker Application Design QuestionHi. We're thinking of implementing Service Broker to expedite incoming traffic and user requested processing.  The short of it is we have a process that needs to kick off when three associated files hit the database.   Every time customer 1's files come  in they are reviewed by the user and he/she requests the process to execute. There are n number of customers each having their own set of 3 files.  The process should not be executed before all three files are present. We have to cover the fact that the files for a given customer can come in at any time and in any order.  It maybe the case that a user has sent a message to execute the final process for a given customer before all the files for that customer are in. In which case we'd like to wait until all files are in and then process the user's request.<br/> <br/> We're stumped about how to set up queues and conversations to manage these scenarios. <br/> <br/> Anyone have any ideas about how to design server broker for this?<br/> <br/> Thanks in Advance<br/>Sun, 14 Jun 2009 23:10:51 Z2009-10-26T01:19:27Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/7a2eb9da-9bb7-4508-b6bd-f9b5960ffcbbhttp://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/7a2eb9da-9bb7-4508-b6bd-f9b5960ffcbbRajesh_vellorehttp://social.msdn.microsoft.com/Profile/en-US/?user=Rajesh_velloreSql Dependency working procedureI am using sql dependency in my windows service code..So when ever there is a change in the table where my sql dependency is watch..onchange event is firing in windows service..<br/> <br/> I am not able to get any where how actually it is working internally(I know just how it is working as a concept)<br/> <br/> I like to know how actually it is working...?<br/> <br/> My current issue is Event is not fired when db server is restarted where my service will be in different system and it will be always in started mode.<br/> <br/> If any one has any idea on above issues please share here....<br/> <br/> Thank you<hr class="sig">rajeshThu, 25 Jun 2009 11:40:15 Z2009-10-24T00:40:54Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/cda66ac2-a99f-4aea-bb68-d929e9f974c3http://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/cda66ac2-a99f-4aea-bb68-d929e9f974c3barkingdoghttp://social.msdn.microsoft.com/Profile/en-US/?user=barkingdogIs Sql 2005 Service Broker be enabled by default?We just installed OpsMgr 2007 on our sql 2005 database server and it complains that: &quot;The SQL Server Service Broker or Database Mirroring transport is disabled or not configured Priority&quot; We have not enabled Service Broker (and we don't use mirroring on this server) so I don't know what to make of that message. I read somewhere that Service Broker is enabled by default. Is that true? (In other words, does the OpsMgr message indicate a &quot;real&quot; problem or is it just saying it is desirable to enable Service Broker?) TIA, barkingdog (Despite the Title confusion, I am asking about a sql 2005, not sql 2008, server) Mon, 29 Jun 2009 07:18:50 Z2009-10-24T00:30:51Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/b631f7c4-87c6-4804-b049-e73f4ac25827http://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/b631f7c4-87c6-4804-b049-e73f4ac25827YoungEngineerhttp://social.msdn.microsoft.com/Profile/en-US/?user=YoungEngineerWhat is Service Broker?Can someone explain to me what Service Broker is please? And what is the purpose of it? How is it different to send mail? Ive read through alot of material, and I understand that its about sending messages, but I dont understand the point of writing code to send and receive messages on the same system. What is the real life use for this?<br/> <br/> *sorry if this sounds idiotic.<br/> <br/> Thanks! <hr class=sig> You are so wise...like a miniature budha covered in fur. -AnchormanWed, 21 Oct 2009 01:46:09 Z2009-10-26T05:07:03Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/f05156e1-10cd-498e-ad80-86e3fb96ff47http://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/f05156e1-10cd-498e-ad80-86e3fb96ff47PugVhttp://social.msdn.microsoft.com/Profile/en-US/?user=PugVMsg 9772 -- Service Broker in database "" cannot be enabled <font color="#0000ff" size="2"> <p>I backed up a database "Broker", and restored it on the same instance as "BrokerQA"&nbsp; (Broker db still exists, I need them both running on the same instance).<br /><br />tried sending a few messages, sys.transmissions_queue says: The broker is disabled in the sender's database.<br /><br />then tried to enable service broker for BrokerQA:<br /><br />alter</font><font size="2"> </font><font color="#0000ff" size="2">database</font><font size="2"> BrokerQA </font><font color="#0000ff" size="2">set</font><font size="2"> enable_broker</p> <p></font><font size="2"><font size="1">Msg 9772, Level 16, State 1, Line 2</p> <p>The Service Broker in database "BrokerQA" cannot be enabled because there is already an enabled Service Broker with the same ID.</p> <p>Msg 5069, Level 16, State 1, Line 2</p> <p>ALTER DATABASE statement failed.<br /></p></font></font><font color="#808080" size="2"><br />How do I reset the service broker ID on the newly restored database? <br />Thanks!</font>Tue, 29 Nov 2005 15:18:32 Z2009-11-02T17:14:26Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/c761edd1-846d-446c-b6df-54045ca19afehttp://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/c761edd1-846d-446c-b6df-54045ca19afePavlehttp://social.msdn.microsoft.com/Profile/en-US/?user=PavleTroubleshooting SB: help me enhance a procedureHi all,<br /> I am not sure if this is the best place to post this but I couldn't think of anywhere else so here it is: <br /> I'm new to Service Broker and I struggled every time something went wrong. There are quite a few things to check so I put all the scripts together to build a procedure which could help me diagnose the service broker situation at a given moment. It would be great if I could have your input on this and thought about how to improve it &amp; make it more useful for everybody. It definitely needs improvement so don't hesitate to add your comments &amp; point out nonsense:<br /> <br /> <pre lang="x-sql">CREATE PROCEDURE dbo.SBStatus ( @target_db1 varchar(100) = 'db1', @target_db2 varchar(100) = 'db2' ) AS BEGIN -- Proc to diagnose Service Broker ----------------------------------------------------- SET NOCOUNT ON DECLARE @sql NVARCHAR(1000), @curdb VARCHAR(50), @target_db VARCHAR(50), @msg NVARCHAR(200) DECLARE @t_res TABLE (name VARCHAR(20), rows INT, reserved varchar(20), data varchar(20), index_size varchar(20), unused varchar(20)) DECLARE @t_svcinfo TABLE (remote_service_name NVARCHAR(256), [broker_instance] NVARCHAR(128)) DECLARE @sb_enabled BIT, @sb_src_guid UNIQUEIDENTIFIER, @sb_target_guid UNIQUEIDENTIFIER, @queue VARCHAR(100), @queue_enabled BIT, @queue_active BIT DECLARE @proc VARCHAR(100), @servicename NVARCHAR(256), @count INT, @exists BIT DECLARE @lnk_server VARCHAR(100) DECLARE @links TABLE (target_db VARCHAR(20)) DECLARE @send_q_threshold INT, @receive_q_threshold INT SET @curdb = DB_NAME() SET @send_q_threshold = 5000 SET @receive_q_threshold = 10000 -- INSERT INTO @links SELECT @target_db1 UNION SELECT @target_db2 -- ----------------------------------------------------- -- Test Source DB ----------------------------------------------------- SELECT ' &gt;&gt;&gt;&gt;&gt;&gt; TESTING: ' + @curdb -- Check if SB is enabled ----------------------------------------------------- SELECT @sb_enabled = is_broker_enabled, @sb_src_guid = service_broker_guid FROM sys.databases WHERE name = @curdb IF @sb_enabled = 0 BEGIN SET @msg = N'Service Broker is NOT enabled! Run ALTER DATABASE ' + @curdb + ' SET ENABLE_BROKER WITH ROLLBACK IMMEDIATE' RAISERROR(@msg, 11, 0) WITH NOWAIT END ELSE BEGIN SET @msg = N'Service Broker is enabled: OK' RAISERROR(@msg, 0, 0) WITH NOWAIT END -- Check if the queue(s) are enabled and active ----------------------------------------------------- IF EXISTS ( SELECT 1 FROM sys.service_queues WHERE is_ms_shipped = 0 AND (is_activation_enabled = 0 OR is_enqueue_enabled = 0) ) BEGIN SET @msg = N'Some queues are disabled or inactive:' RAISERROR(@msg, 11, 0) WITH NOWAIT SELECT name AS 'Queue', is_activation_enabled AS 'Active', is_enqueue_enabled AS 'Enabled' FROM sys.service_queues WHERE is_ms_shipped = 0 END ELSE BEGIN SET @msg = N'Queues are enabled and active: OK' RAISERROR(@msg, 0, 0) WITH NOWAIT END -- Check if messages are targeting undefined remote services ----------------------------------------------------- IF EXISTS ( SELECT tq.to_service_name FROM sys.transmission_queue AS tq WHERE NOT EXISTS( SELECT remote_service_name FROM sys.routes AS routes WHERE tq.to_service_name = routes.remote_service_name ) ) BEGIN SET @msg = N'Some messages might not be delivered because the remote service name is unknown:' RAISERROR(@msg, 11, 0) WITH NOWAIT SELECT tq.to_service_name AS 'Services with no Exact Match' FROM sys.transmission_queue AS tq WHERE NOT EXISTS( SELECT remote_service_name FROM sys.routes AS routes WHERE tq.to_service_name = routes.remote_service_name ) END -- Check if we have blocked messages ----------------------------------------------------- IF EXISTS ( SELECT 1 FROM sys.transmission_queue WITH (NOLOCK) WHERE transmission_status IS NOT NULL UNION SELECT 1 FROM sys.conversation_endpoints WITH (NOLOCK) WHERE State IN ('DI', 'DO', 'ER') ) BEGIN SET @msg = N'Some messages couldn''t be sent. Some examples:' RAISERROR(@msg, 11, 0) WITH NOWAIT SELECT TOP 5 conversation_handle, from_service_name 'Source Service', to_service_name 'Target Service', message_type_name, transmission_status FROM sys.transmission_queue WITH (NOLOCK) WHERE transmission_status IS NOT NULL SELECT TOP 5 conversation_handle, state_desc FROM sys.conversation_endpoints WITH (NOLOCK) WHERE State IN ('DI', 'DO', 'ER') END -- Check the size of the transmission queue ----------------------------------------------------- INSERT INTO @t_res (name, rows, reserved, data, index_size, unused) EXEC sp_spaceused 'sys.sysxmitqueue' SELECT @count = rows FROM @t_res IF @count &lt; @send_q_threshold BEGIN SET @msg = N'Transmission queue length: ' + CONVERT(NVARCHAR(15),@count) RAISERROR(@msg, 0, 0) WITH NOWAIT END ELSE BEGIN SET @msg = N'Transmission queue length: ' + CONVERT(NVARCHAR(15),@count) RAISERROR(@msg, 11, 0) WITH NOWAIT END -- Show queue(s) detail if queues have a reasonable size (to avoid timouts during the COUNT()) ----------------------------------------------------- IF @count &lt; 300000 BEGIN PRINT 'Detailed queue info:' + CHAR(13) SELECT --t1.name AS [Service_Name], t3.name + '.' + t2.name AS [Queue], CASE WHEN t4.state IS NULL THEN 'Not available' ELSE t4.state END AS [Queue_State], CASE WHEN t4.last_activated_time IS NULL THEN '--' ELSE CONVERT(varchar, t4.last_activated_time) END AS last_activated_time , ( SELECT COUNT(1) FROM sys.transmission_queue t6 WHERE (t6.from_service_name = t1.name) ) AS [Tran_Message_Count] FROM sys.services t1 INNER JOIN sys.service_queues t2 ON ( t1.service_queue_id = t2.object_id ) INNER JOIN sys.schemas t3 ON ( t2.schema_id = t3.schema_id ) LEFT OUTER JOIN sys.dm_broker_queue_monitors t4 ON ( t2.object_id = t4.queue_id AND t4.database_id = DB_ID(@curdb) ) INNER JOIN sys.databases t5 ON ( t5.database_id = DB_ID(@curdb)) WHERE t2.is_ms_shipped = 0 END -- Show active conversations ----------------------------------------------------- IF EXISTS ( SELECT 1 FROM sys.conversation_endpoints WITH (NOLOCK) ) BEGIN SET @msg = N'Current conversations: There are active conversations: ' RAISERROR(@msg, 0, 0) WITH NOWAIT SELECT conversation_handle, state_desc, far_service, far_broker_instance FROM sys.conversation_endpoints WITH (NOLOCK) END ELSE BEGIN SET @msg = N'Current conversations: There are no active conversations' RAISERROR(@msg, 0, 0) WITH NOWAIT END -- Get remote SB id's for later connectivity checks ----------------------------------------------------- INSERT INTO @t_svcinfo (remote_service_name, [broker_instance]) SELECT remote_service_name, [broker_instance] FROM sys.routes ----------------------------------------------------- ----------------------------------------------------- ----------------------------------------------------- -- Test Target server(s) ----------------------------------------------------- DECLARE cur_targets CURSOR LOCAL FAST_FORWARD FOR SELECT target_db FROM @links OPEN cur_targets FETCH NEXT FROM cur_targets INTO @target_db WHILE (@@FETCH_STATUS = 0) BEGIN SELECT ' &gt;&gt;&gt;&gt;&gt;&gt; TESTING: ' + @target_db -- target DB must be declared as default db in the linked server config SELECT @lnk_server = name FROM sys.servers WHERE catalog = @target_db -- Enable RPC on target server ----------------------------------------------------- SET @sql = N'EXEC master.dbo.sp_serveroption @server=N'''+@lnk_server+''', @optname=N''rpc out'', @optvalue=N''true''' EXECUTE sp_executesql @sql -- Check if SB is enabled ----------------------------------------------------- SET @sql = N'SELECT @sb_enabled = is_broker_enabled, @sb_target_guid = service_broker_guid FROM ' + @lnk_server + '.'+ @target_db +'.sys.databases WHERE name = ''' + @target_db + '''' EXECUTE sp_executesql @sql, N'@sb_enabled BIT OUTPUT, @sb_target_guid UNIQUEIDENTIFIER OUTPUT', @sb_enabled = @sb_enabled OUTPUT, @sb_target_guid = @sb_target_guid OUTPUT IF @sb_enabled = 0 BEGIN SET @msg = N'Service Broker is NOT enabled! Run ALTER DATABASE ' + @target_db + ' SET ENABLE_BROKER WITH ROLLBACK IMMEDIATE' RAISERROR(@msg, 11, 0) WITH NOWAIT END ELSE BEGIN SET @msg = N'Service Broker is enabled: OK' RAISERROR(@msg, 0, 0) WITH NOWAIT END -- Check if the queue(s) are enabled and active ----------------------------------------------------- SET @sql = N'SELECT @exists = 1 FROM ' + @lnk_server + '.'+ @target_db +'.sys.service_queues WHERE is_ms_shipped = 0 AND (is_activation_enabled = 0 OR is_enqueue_enabled = 0)' EXECUTE sp_executesql @sql, N'@exists BIT OUTPUT', @exists = @exists OUTPUT IF @exists IS NOT NULL BEGIN SET @msg = N'Some queues are disabled or inactive:' RAISERROR(@msg, 11, 0) WITH NOWAIT SELECT name AS 'Queue', is_activation_enabled AS 'Active', is_enqueue_enabled AS 'Enabled' FROM sys.service_queues WHERE is_ms_shipped = 0 END ELSE BEGIN SET @msg = N'Queues are enabled and active: OK' RAISERROR(@msg, 0, 0) WITH NOWAIT END -- Check the size of the receiving queue(s) ----------------------------------------------------- SET @sql = N'SELECT @servicename = s.name, @queue = parent.name, @count = [rows] FROM ' + @lnk_server + '.'+ @target_db +'.sys.partitions p INNER JOIN ' + @lnk_server + '.'+ @target_db +'.sys.objects child ON p.object_id = child.object_id INNER JOIN ' + @lnk_server + '.'+ @target_db +'.sys.objects parent ON parent.object_id = child.parent_object_id INNER JOIN ' + @lnk_server + '.'+ @target_db +'.sys.services s ON parent.object_id = s.service_queue_id WHERE index_id in (0, 1) AND parent.is_ms_shipped = 0' EXECUTE sp_executesql @sql, N'@queue VARCHAR(100) OUTPUT, @count INT OUTPUT, @servicename NVARCHAR(256) OUTPUT', @queue = @queue OUTPUT, @count = @count OUTPUT, @servicename = @servicename OUTPUT /* SET @SQL = N'EXEC ' + @lnk_server + '.'+ @target_db +'.dbo.sp_spaceused ''dbo.' + @queue + '''' PRINT 'Current size of the '+ @queue + ' queue:' EXECUTE sp_executesql @sql */ IF @count &lt; @receive_q_threshold BEGIN SET @msg = N'' + @queue + ' (receiving queue) length: ' + CONVERT(NVARCHAR(15),@count) RAISERROR(@msg, 0, 0) WITH NOWAIT END ELSE BEGIN SET @msg = N'' + @queue + ' (receiving queue) length: ' + CONVERT(NVARCHAR(15),@count) RAISERROR(@msg, 11, 0) WITH NOWAIT END -- Check SB connectivity with this DB (doesn't work if more than 1 service links the source &amp; target DB's) ----------------------------------------------------- IF ( SELECT CASE WHEN [broker_instance] = @sb_target_guid THEN 1 ELSE 0 END FROM @t_svcinfo WHERE remote_service_name = @servicename ) = 1 BEGIN SET @msg = N'SB GUID matches between source and target DB' RAISERROR(@msg, 0, 0) WITH NOWAIT END ELSE BEGIN SET @msg = N'SB GUID mismatch between source and target DB' RAISERROR(@msg, 11, 0) WITH NOWAIT END FETCH NEXT FROM cur_targets INTO @target_db END END </pre> Thank you!Thu, 15 Oct 2009 14:47:15 Z2009-10-19T10:27:10Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/9aa98ed7-c1df-4e7d-b89b-1d875088628ahttp://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/9aa98ed7-c1df-4e7d-b89b-1d875088628aOutlander_DBAhttp://social.msdn.microsoft.com/Profile/en-US/?user=Outlander_DBAHow to delete rows from Queues Hello There,<br /> I&nbsp; am having problem to delete rows/Messages from Queues in&nbsp; sql server 2008.<br /> <br /> The problem is that , few weeks ago some installed sql monitoring software in UAT DATABASE SERVER. then after he probley uninstalle it.but that monitoring software has created some Queue,services in MSDB database. We deleted all table's and storeprocedure's related to that Activity Monitor Software.But now<br /> this perticular Queue has 5,709,653 rows/messages in it. When I am trying to delete this Queue&nbsp; it gives message that there is &quot;SERVICE&quot; exist related to it.<br /> <br /> When I am trying to delete this perticular SERVICE ,it taking log time and if i see result during this period it deleting rows but&nbsp; meanwhile my Transaction Log also getting fill up, and when Txn Log reach at maxium&nbsp; it kill my procosess and giving me message to increate transaction log size (During this period it has already used my 8GB Txns Log.) <br /> <br /> so i want to get rid of this Queue,any how?<br /> <br /> Here is my queue defination :<br /> USE [msdb]<br /> GO<br /> /****** Object:&nbsp; ServiceQueue [LakeSideWaitsLogger].[_LakeSide_DbTools_Waits_LogOutQueue]&nbsp;&nbsp;&nbsp; Script Date: 10/16/2009 15:09:48 ******/<br /> ALTER QUEUE [LakeSideWaitsLogger].[_LakeSide_DbTools_Waits_LogOutQueue] WITH STATUS = ON , RETENTION = ON , ACTIVATION (&nbsp; STATUS = ON , PROCEDURE_NAME = [dbo].[Lakeside_Dummy] , MAX_QUEUE_READERS = 1 , EXECUTE AS N'dbo'&nbsp; )<br /> <br /> <br /> And i tried all this statement , but still now succeed.<br /> <br /> <pre lang="x-sql">drop queue [msdb].[LakeSideWaitsLogger].[_LakeSide_DbTools_Waits_LogOutQueue];<br /> Msg 8442, Level 16, State 1, Line 1<br /> There is no Service Broker active in the database. Change to a database context that contains a Service Broker.<br /> --------------------------------------------------------------------------------------------------------------------<br /> <br /> <br /> declare @conversationHandle uniqueidentifier select top 1 @conversationHandle = conversation_handle from sys.conversation_endpoints where service_id = 2 while @@rowcount = 1 begin end conversation @conversationHandle with cleanup select top 1 @conversationHandle = conversation_handle from sys.conversation_endpoints where service_id = 2 end</pre> Thanks for any help ...<br />Fri, 16 Oct 2009 14:21:42 Z2009-10-19T16:14:46Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/c211a104-96a9-4806-be16-53dc3aa97f83http://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/c211a104-96a9-4806-be16-53dc3aa97f83Daviduhttp://social.msdn.microsoft.com/Profile/en-US/?user=DaviduSEND MSMQ MESSAGE FROM SQL SERVER 2005 STORED PROCEDURESHi,<br /> <br /> How to send MSMQ message from stored procedure in sql server 2005 /2008?Tue, 13 Oct 2009 10:02:45 Z2009-10-15T03:45:41Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/9aae8622-847f-4bb5-99df-88412f6538b4http://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/9aae8622-847f-4bb5-99df-88412f6538b4Lele2009http://social.msdn.microsoft.com/Profile/en-US/?user=Lele2009Application Design Question<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-size: 8pt; color: black; font-family: Verdana;">We are designing weather applications&nbsp;that allow users to specify a city for weather notifications, such as temperature below 20 degree. Users will get alert message when the weather condition matches the condition. SQL notification service should be a good fit to use; however with the consideration of notification services is no longer in SQL server 2008, do we need to find an alternate way? Is service broker a good choice? Is there any limitation? Any input are highly appreciated.<br /><br />Thanks,</span></p><hr class="sig">CiciWed, 14 Oct 2009 19:49:36 Z2009-10-21T02:14:42Z