I got a couple of spare minutes while my tests are running. I'd like to use this time to share with you a simple but painful situation I have every time I need to verify Service Broker regressions in the internal SQL Server builds.

According to official Microsoft web site we supply Service Broker in Enterprise SKU for sure. However our internal test build has this feature disabled by default. I spent pretty much time exploring the options to get it enabled.

Basically, there are 2 probems:

1. Service Broker endpoint is not configured. To resolve this problem you need connect to the server and run a query

CREATE ENDPOINT BrokerEndpoint
STATE = STARTED
AS TCP
(
LISTENER_PORT = 4022
)
FOR SERVICE_BROKER (AUTHENTICATION = WINDOWS)
GO

This query will create a service broker if it doesn't exist. If you have one but need to start/stop it please refer to the documentation.

2. Service Broker is configured and running but the database is not configured for the Service Broker. To solve this issue you have to run a query one of the listed below:

-- Enable Service Broker:
ALTER DATABASE [Database Name] SET ENABLE_BROKER;
-- Disable Service Broker:
ALTER DATABASE [Database Name] SET DISABLE_BROKER;

If you still can't solve your problem please write on the Microsoft Service Broker blog.

Once I figured these two queries my life has become much easier. Hope this helps you as well.