Cannot find the queue 'SqlQueryNotificationService-{guid}'<P>I am trying to get my application running on a customer site. They are being very picky about security on the database.&nbsp; What are the correct permissions to setup to allow my sql user to use the Service Broker. </P> <P>Currently I am receiving the following error: </P> <P>Cannot fin the user 'owner', because it does not exist or you do not have permission.</P> <P>Cannot find the queue 'SqlQueryNotificationService-&lt;guid&gt;', because it does not exist or you do not have permission. </P> <P>If I make my user db_owner it seems to work on other installs. </P> <P>Thanks so much, <BR><BR>~ Steve</P>© 2009 Microsoft Corporation. All rights reserved.Fri, 12 Dec 2008 05:23:43 Zbd195da8-93b2-43c6-8f59-674f5fb9d618http://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/bd195da8-93b2-43c6-8f59-674f5fb9d618#bd195da8-93b2-43c6-8f59-674f5fb9d618http://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/bd195da8-93b2-43c6-8f59-674f5fb9d618#bd195da8-93b2-43c6-8f59-674f5fb9d618sslokahttp://social.msdn.microsoft.com/Profile/en-US/?user=sslokaCannot find the queue 'SqlQueryNotificationService-{guid}'<P>I am trying to get my application running on a customer site. They are being very picky about security on the database.&nbsp; What are the correct permissions to setup to allow my sql user to use the Service Broker. </P> <P>Currently I am receiving the following error: </P> <P>Cannot fin the user 'owner', because it does not exist or you do not have permission.</P> <P>Cannot find the queue 'SqlQueryNotificationService-&lt;guid&gt;', because it does not exist or you do not have permission. </P> <P>If I make my user db_owner it seems to work on other installs. </P> <P>Thanks so much, <BR><BR>~ Steve</P>Thu, 06 Jul 2006 20:52:51 Z2006-07-12T18:21:23Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/bd195da8-93b2-43c6-8f59-674f5fb9d618#38baa8b9-fed4-44b7-8d96-46fe057897c0http://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/bd195da8-93b2-43c6-8f59-674f5fb9d618#38baa8b9-fed4-44b7-8d96-46fe057897c0Remus Rusanuhttp://social.msdn.microsoft.com/Profile/en-US/?user=Remus%20RusanuCannot find the queue 'SqlQueryNotificationService-{guid}'<p>Based on the service name, this seems to be a SqlDependency case, isn't it?</p> <p><font face=Verdana>Can you explain which command do you run when you're getting this error?</font></p> <p><font face=Verdana>Thanks,<br>~ Remus</font></p>Thu, 06 Jul 2006 21:00:48 Z2006-07-06T21:00:48Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/bd195da8-93b2-43c6-8f59-674f5fb9d618#a9264496-d095-471c-8db7-5dbec4c515a4http://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/bd195da8-93b2-43c6-8f59-674f5fb9d618#a9264496-d095-471c-8db7-5dbec4c515a4sslokahttp://social.msdn.microsoft.com/Profile/en-US/?user=sslokaCannot find the queue 'SqlQueryNotificationService-{guid}'<p>I am using the code exactly from the following article in MSDN Magazine for an ASP.NET website.  <a title="http://msdn.microsoft.com/msdnmag/issues/06/02/WickedCode/" href="http://msdn.microsoft.com/msdnmag/issues/06/02/WickedCode/">http://msdn.microsoft.com/msdnmag/issues/06/02/WickedCode/</a></p> <p>Basically I'm substituting a sql database for the XML file to make things better on my end.  </p> <p>When I try to run the site and hit the first page, I get that error above.  </p> <p>I have deployed this app a 5-6 locations already, in each of those cases I have my own SQL Express database so I'm controlling the security (which I made my sql user db_owner). </p> <p>This is a SQL SQL2005 Standard install which I don't have full access.  </p> <p>Please let me know if you need any more information. </p> <p>Thanks, <br><br>~ Steve</p>Fri, 07 Jul 2006 00:14:04 Z2006-07-07T00:14:04Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/bd195da8-93b2-43c6-8f59-674f5fb9d618#07b48461-0ff2-4643-af6b-6d1bb95de05bhttp://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/bd195da8-93b2-43c6-8f59-674f5fb9d618#07b48461-0ff2-4643-af6b-6d1bb95de05bRemus Rusanuhttp://social.msdn.microsoft.com/Profile/en-US/?user=Remus%20RusanuCannot find the queue 'SqlQueryNotificationService-{guid}'<p>In order to use the SqlDependency infrastructure, the sql user must be able to create a procedure, a service and a queue, must be granted REFERENCES permission on the QN contract and must have 'subscribe query notifications' permission. In adition, for reasons I'm not sure I comprehend, it must have have suficient permissions over the [dbo] schema to be able to create a queue and procedure in it and be able impersonate the queue owner (that is, [dbo]).</p><span style="font-size:10pt;color:blue;font-family:'Courier New'"><span style="font-size:10pt;color:blue;font-family:'Courier New'"> <p class=MsoNormal style="margin:0in 0in 0pt"><font size=3><span style="font-size:10pt;color:blue;font-family:'Courier New'">GRANT</span><span style="font-size:10pt;font-family:'Courier New'"><font color="#000000"> </font><span style="color:blue">CREATE</span><font color="#000000"> </font><span style="color:blue">PROCEDURE</span><font color="#000000"> </font><span style="color:blue">TO</span><font color="#000000"> [SqlUser]</font><span style="color:gray">;</span></span></font></p> <p class=MsoNormal style="margin:0in 0in 0pt"><font size=3><span style="font-size:10pt;color:blue;font-family:'Courier New'">GRANT</span><span style="font-size:10pt;font-family:'Courier New'"><font color="#000000"> </font><span style="color:blue">CREATE</span><font color="#000000"> </font><span style="color:blue">SERVICE</span><font color="#000000"> </font><span style="color:blue">TO</span><font color="#000000"> [SqlUser]</font><span style="color:gray">;</span></span></font></p> <p class=MsoNormal style="margin:0in 0in 0pt"><font size=3><span style="font-size:10pt;color:blue;font-family:'Courier New'">GRANT</span><span style="font-size:10pt;font-family:'Courier New'"><font color="#000000"> </font><span style="color:blue">CREATE</span><font color="#000000"> </font><span style="color:blue">QUEUE</span><font color="#000000"> </font><span style="color:blue">TO</span><font color="#000000"> [SqlUser]</font><span style="color:gray">;</span></span></font></p> <p class=MsoNormal style="margin:0in 0in 0pt"><font size=3><span style="font-size:10pt;color:blue;font-family:'Courier New'">GRANT</span><span style="font-size:10pt;font-family:'Courier New'"><font color="#000000"> </font><span style="color:blue">REFERENCES</span><font color="#000000"> </font><span style="color:blue">ON</span><font color="#000000"> </font><span style="color:blue">CONTRACT</span><span style="color:gray">::</span><font color="#000000">[http://schemas.microsoft.com/SQL/Notifications/PostQueryNotification] </font><span style="color:blue">TO</span><font color="#000000"> [SqlUser]</font><span style="color:gray">;</span></span></font></p><span style="font-size:10pt;color:blue;font-family:'Courier New'"> <p class=MsoNormal style="margin:0in 0in 0pt"><font size=3><span style="font-size:10pt;color:blue;font-family:'Courier New'">GRANT</span><span style="font-size:10pt;font-family:'Courier New'"><font color="#000000"> SUBSCRIBE QUERY NOTIFICATIONS </font><span style="color:blue">TO</span><font color="#000000"> [SqlUser];</font></span></font></p> <p class=MsoNormal style="margin:0in 0in 0pt"><font size=3><span style="font-size:10pt;color:blue;font-family:'Courier New'">GRANT</span><span style="font-size:10pt;font-family:'Courier New'"><font color="#000000"> CONTROL</font></span></font></span><span style="font-size:10pt;font-family:'Courier New'"><font size=3><font color="#000000"> </font><span style="color:blue">ON</span><font color="#000000"> </font><span style="color:blue">SCHEMA</span><span style="color:gray">::</span><font color="#000000">[dbo] </font><span style="color:blue">TO</span><font color="#000000"> [SqlUser]</font><span style="color:gray">;</span></font></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><font size=3><span style="font-size:10pt;color:blue;font-family:'Courier New'">GRANT</span><span style="font-size:10pt;font-family:'Courier New'"><font color="#000000"> IMPERSONATE </font><span style="color:blue">ON</span><font color="#000000"> </font><span style="color:fuchsia">USER</span><span style="color:gray">::</span><font color="#000000">DBO </font><span style="color:blue">TO</span><font color="#000000"> [SqlUser];</font></span></font></p> <p class=MsoNormal style="margin:0in 0in 0pt"><font face="Times New Roman" color="#000000" size=3></font> </p> <p class=MsoNormal style="margin:0in 0in 0pt"><font face="Times New Roman" color="#000000" size=3>HTH,<br>~ Remus</font></span></span></p>Fri, 07 Jul 2006 01:18:55 Z2006-07-12T18:21:23Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/bd195da8-93b2-43c6-8f59-674f5fb9d618#4c9c53ca-b799-4df1-9c44-cc43a0b35015http://social.msdn.microsoft.com/Forums/en-US/sqlservicebroker/thread/bd195da8-93b2-43c6-8f59-674f5fb9d618#4c9c53ca-b799-4df1-9c44-cc43a0b35015boulderbumhttp://social.msdn.microsoft.com/Profile/en-US/?user=boulderbumCannot find the queue 'SqlQueryNotificationService-{guid}'<p>Of note is that you don't need to give control over the dbo schema (which seems like it would be dangerous), rather you can create a new, empty schema and give your user rights to it.</p> <p>The reason for granting rights to a schema is that all of the objects the user creates (the query notification stored procedure, etc.) need to be created in some space or &quot;schema&quot; so you need to configure the permissions accordingly.</p>Mon, 31 Jul 2006 23:20:51 Z2006-07-31T23:20:51Z