To determine whether or not Service Broker is enabled, execute the following T-SQL:
SELECT is_broker_enabled FROM sys.databases WHERE name = ‘DatabaseName’;
— Where ‘DatabaseName’ is the name of the database you want to query.
is_broker_enabled will be 1 if Service Broker is enabled for the given database, otherwise it’ll be 0.
Enabling Service Broker
— Enable Service Broker:
ALTER DATABASE [DatabaseName] SET ENABLE_BROKER;
— Disable Service Broker:
ALTER DATABASE [DatabaseName] SET DISABLE_BROKER;