Search code examples
sql-serverservice-broker

Activation script hangs and cannot shutdown


I have implemented SQL Server Service Broker with error handling according to this article by Remus Resanu.

When I ran the process and the activation script got kicked off but never stopped processing. According to the SQL Server log file it looks like I have a typo in my error handling and it is now stuck in an infinite loop.

I have tried to kill the process using kill <pid> but I get the message Only user processes can be killed. I have also tried restarting the server but the activation script would start again.

How do I kill the runaway activation process?


Solution

  • I was not able to find a solution through google/bing search. I eventually remembered that we enabled the Service broker through a SQL command, so I tried disabling it and that seems to have worked:

    ALTER DATABASE dbname SET DISABLE_BROKER;