none
How to delete Service and Queue?

    Question

  • I am completely new to Service Broker. I got introduced to it indirectly when learning SQL Server Cache Dependency for ASP.NET data caching.  When running a code sample a Service and Queue were created on development database. I am done with this sample but I still see recurring "BEGIN CONVERSATION..." and "WAITFOR(RECEIVE TOP (1)..." queries (every minute or so) for this database in SQL Server profile. Such queries do not appear for any other database.

    After taking a closer look I found there is a queue and a service under "Service Broker" for this database. I deleted them both but the queries didn't stop and after checking again I see that they somehow got re-created "automagically".

    Hot to get rid of them completely?

    Thursday, July 03, 2014 1:52 PM

All replies

  • Hello,

    Do you mean the objects under "Queues => System Queues" / "Services => System Services"? That are System objects, which can't be deleted.

    But the queries are running from a Client app / Queue activator, so check which Client(s) sends the requests.


    Olaf Helper

    [ Blog] [ Xing] [ MVP]

    Thursday, July 03, 2014 1:59 PM
  • Hello,

    Do you mean the objects under "Queues => System Queues" / "Services => System Services"? That are System objects, which can't be deleted.

    But the queries are running from a Client app / Queue activator, so check which Client(s) sends the requests.


    Olaf Helper

    [ Blog] [ Xing] [ MVP]


    No, I mean under SomeDatabase\Service Broker\Queues and SomeDatabase\Service Broker\Services.
    Thursday, July 03, 2014 2:02 PM
  • Here is what I found: after I close browser where my web app was running these queries still occur. After I stop web server that is built into Visual Studio queries stop. After I checked for existence of service and queue some time later they were gone.

    Thursday, July 03, 2014 2:16 PM