Service Broker is not starting
-
27-09-2019 - |
Question
ALTER DATABASE [Database Name] SET ENABLE_BROKER; Does not respond, and works infinitely. SQL Agent service is running, what is chances?
Thanks
Solution
How long should I expect ALTER DATABASE … SET ENABLE_BROKER to run?
ALTER DATABASE ... SET ENABLE_BROKER
requires exclusive access on the database and it will block if there is any other session in the database. To force it, you can use the WITH ROLLBACK
clause that will kill any session that blocks your ALTE
R:
ALTER DATABASE [<dbname>] SET ENABLE_BROKER WITH ROLLBACK IMMEDIATE;
OTHER TIPS
You should kill all processes for that Database first. Here is how to do.
http://www.kodyaz.com/articles/kill-all-processes-of-a-database.aspx
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow