Need help to figure out this SqlQueryNotificationService error.<p align=left><font face=Arial size=2>I found every several minutes, sometimes one or twice in an hour, I still get a dozen error like below logged in SQL Log.  See the error is &quot;<u><font color="#0066cc">You</font></u> do not have permission to access the service&quot;. I found some articles on other errors, but nothing about this error.  I want to get more information on this, and a way to trace what is the permission about and which user doesn't have the permission.</font></p> <p><br>Source  spid26s</p> <p>Message<br>The query notification dialog on conversation handle '{E6FC299F-8BFE-DC11-A4E1-000D5670268E}.' closed due to the following error: '&lt;?xml version=&quot;1.0&quot;?&gt;&lt;Error xmlns=&quot;<a href="http://schemas.microsoft.com/SQL/ServiceBroker/Error&quot;&gt;&lt;Code&gt;-8494&lt;/Code&gt;&lt;Description&gt;You">http://schemas.microsoft.com/SQL/ServiceBroker/Error&quot;&gt;&lt;Code&gt;-8494&lt;/Code&gt;&lt;Description&gt;You</a> do not have permission to access the service &amp;apos;SqlQueryNotificationService-9ff8b39d-90a8-45bc-83a7-23837920774d&amp;apos;.&lt;/Description&gt;&lt;/Error&gt;'.</p> <p> </p> <p align=left> </p> <p align=left>thanks</p>© 2009 Microsoft Corporation. All rights reserved.Fri, 12 Dec 2008 05:23:43 Z505778e4-be04-4673-892c-917b91872aefhttp://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/505778e4-be04-4673-892c-917b91872aef#505778e4-be04-4673-892c-917b91872aefhttp://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/505778e4-be04-4673-892c-917b91872aef#505778e4-be04-4673-892c-917b91872aefdavidwhttp://social.msdn.microsoft.com/Profile/en-US/?user=davidwNeed help to figure out this SqlQueryNotificationService error.<p align=left><font face=Arial size=2>I found every several minutes, sometimes one or twice in an hour, I still get a dozen error like below logged in SQL Log.  See the error is &quot;<u><font color="#0066cc">You</font></u> do not have permission to access the service&quot;. I found some articles on other errors, but nothing about this error.  I want to get more information on this, and a way to trace what is the permission about and which user doesn't have the permission.</font></p> <p><br>Source  spid26s</p> <p>Message<br>The query notification dialog on conversation handle '{E6FC299F-8BFE-DC11-A4E1-000D5670268E}.' closed due to the following error: '&lt;?xml version=&quot;1.0&quot;?&gt;&lt;Error xmlns=&quot;<a href="http://schemas.microsoft.com/SQL/ServiceBroker/Error&quot;&gt;&lt;Code&gt;-8494&lt;/Code&gt;&lt;Description&gt;You">http://schemas.microsoft.com/SQL/ServiceBroker/Error&quot;&gt;&lt;Code&gt;-8494&lt;/Code&gt;&lt;Description&gt;You</a> do not have permission to access the service &amp;apos;SqlQueryNotificationService-9ff8b39d-90a8-45bc-83a7-23837920774d&amp;apos;.&lt;/Description&gt;&lt;/Error&gt;'.</p> <p> </p> <p align=left> </p> <p align=left>thanks</p>Sun, 30 Mar 2008 20:04:45 Z2008-03-30T20:04:45Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/505778e4-be04-4673-892c-917b91872aef#38b2f71e-58b6-481a-8d8a-2b0947189162http://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/505778e4-be04-4673-892c-917b91872aef#38b2f71e-58b6-481a-8d8a-2b0947189162怡红公子http://social.msdn.microsoft.com/Profile/en-US/?user=%u6021%u7ea2%u516c%u5b50Need help to figure out this SqlQueryNotificationService error.<p align=left><font face=Arial size=2></font> </p>Did you grant send permission on the service to public?Mon, 31 Mar 2008 07:39:52 Z2008-03-31T07:39:52Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/505778e4-be04-4673-892c-917b91872aef#6d7fbad4-8059-42f5-99fc-01c9e85992c8http://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/505778e4-be04-4673-892c-917b91872aef#6d7fbad4-8059-42f5-99fc-01c9e85992c8Remus Rusanuhttp://social.msdn.microsoft.com/Profile/en-US/?user=Remus%20RusanuNeed help to figure out this SqlQueryNotificationService error.SqlDependency creates the temporary queue/service under the account used in the SqlDependency.Start call. But the individual notifications are created under the account used by the connection that executes the SqlCommand.Execute... If these two are different and from time to time the account calling SqlCommand.Execute... does not have the necessary permission you will get this error. An example of a scenario that exposes this problem could be a web app that starts the notifications using one fixed account (eg. the appdomain account, or a user/pwd connection string) but later when the notifications are subscribed it happens under an impersonated account. Some impersonated users may not have the necessary permission.<font face=Arial size=2></font> <div><span class=Apple-style-span style="white-space:normal">Unfortunately there is no solution for this. Since the temporary service name and creation /destruction are outside your control, you cannot grant SEND permissions individually on them. So, as with any problem with SqlDependency, the way to 'fix' it is to completely ditch the SqlDependency feature and go for the more basic <a title="http://msdn2.microsoft.com/en-us/library/system.data.sql.sqlnotificationrequest.aspx" href="http://msdn2.microsoft.com/en-us/library/system.data.sql.sqlnotificationrequest.aspx">SqlNotificationRequest Class (System.Data.Sql)</a> that allows more granular control over what's going on. This is not something a dba can do, is an application change that has to be done by the developers.</span></div>Mon, 31 Mar 2008 08:02:20 Z2008-03-31T08:02:20Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/505778e4-be04-4673-892c-917b91872aef#2fb0b1a7-180a-43d6-8baa-dce9493e742ahttp://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/505778e4-be04-4673-892c-917b91872aef#2fb0b1a7-180a-43d6-8baa-dce9493e742adavidwhttp://social.msdn.microsoft.com/Profile/en-US/?user=davidwNeed help to figure out this SqlQueryNotificationService error.<p align=left>Woo! that is really something!</p> <p align=left> </p> <p align=left>I start the SQLDependency with a higher level user, a user with create permission, while the normal user only has access/read/write permission. </p> <p align=left> </p> <p align=left>I thought it is reason when I set like that. What a problem, just know it doesn't work this way.</p> <p align=left> </p> <p align=left>Thanks!</p>Mon, 31 Mar 2008 19:51:05 Z2008-03-31T19:51:05Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/505778e4-be04-4673-892c-917b91872aef#a0384c1a-cf1a-4279-8ec7-91cec391bdd5http://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/505778e4-be04-4673-892c-917b91872aef#a0384c1a-cf1a-4279-8ec7-91cec391bdd5davidwhttp://social.msdn.microsoft.com/Profile/en-US/?user=davidwNeed help to figure out this SqlQueryNotificationService error.<p align=left><font face=Arial size=2>One thing to confirm, you know I always use two users, ablesa and ableuser, ablesa has all permissions, I already use ablesa to start SqlDependency and use ableuser to do all other access. </font></p> <p align=left>I got those errors, what you said help me to understand what was wrong, but just want to know more, since the SQLdependency did work fine for me , at least I didn't find anything wrong. So that error happens understand what situation?</p>Mon, 31 Mar 2008 20:09:14 Z2008-03-31T20:09:14Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/505778e4-be04-4673-892c-917b91872aef#e1bdb3da-c454-4810-81f1-f7216f8580c1http://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/505778e4-be04-4673-892c-917b91872aef#e1bdb3da-c454-4810-81f1-f7216f8580c1davidwhttp://social.msdn.microsoft.com/Profile/en-US/?user=davidwNeed help to figure out this SqlQueryNotificationService error.<p align=left><font face=Arial size=2>From this link, it seems you can have two users, one for Start, one for subscribe</font></p> <p align=left> </p> <p align=left><a title="http://www.codeproject.com/KB/database/SqlDependencyPermissions.aspx?msg=2487937#xx2487937xx" href="http://www.codeproject.com/KB/database/SqlDependencyPermissions.aspx?msg=2487937#xx2487937xx">http://www.codeproject.com/KB/database/SqlDependencyPermissions.aspx?msg=2487937#xx2487937xx</a></p> <p align=left> </p> <p align=left>in my case, both users has dbo as default schema, I tried to make the subscribe user dbo of the db, and it seems that does work.</p> <p align=left> </p> <p align=left>sounds like the start user create the query under dbo, but the subscribe user doesn't have pemission to access it. Not sure what permission it need</p>Mon, 31 Mar 2008 23:25:48 Z2008-03-31T23:25:48Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/505778e4-be04-4673-892c-917b91872aef#4ff6a85f-12f2-4a03-87a7-d0d49482a307http://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/505778e4-be04-4673-892c-917b91872aef#4ff6a85f-12f2-4a03-87a7-d0d49482a307davidwhttp://social.msdn.microsoft.com/Profile/en-US/?user=davidwNeed help to figure out this SqlQueryNotificationService error.<div class=quote> <table width="85%"> <tbody> <tr> <td class=txt4> <strong>怡红公子 wrote:</strong></td></tr> <tr> <td class=quoteTable> <table width="100%"> <tbody> <tr> <td class=txt4 valign=top width="100%"> <p align=left><font face=Arial size=2></font> </p> <p>Did you grant send permission on the service to public?</p></td></tr></tbody></table></td></tr></tbody></table></div> <p></p> <p align=left> </p> <p align=left>It seems what you said relates to this</p> <p align=left><br>GRANT SEND on service:<img alt="Tongue Tied" src="http://forums.microsoft.com/MSDN/emoticons/emotion-7.gif">qlQueryNotificationService to guest</p> <p align=left> </p> <p align=left>I found everyone have problem to find SqlQueryNotificationService . The permission is on SqlQueryNotificationService-GUID, I think if you can grand send on SqlQueryNotificationService-GUID, it could solve the problem, but the SqlQueryNotificationService-GUID is created by SQLDependency Start I guess. not sure if there is a way to set permission for all SqlQueryNotificationService</p>Mon, 31 Mar 2008 23:57:35 Z2008-03-31T23:57:35Z