How to: Activate Service Broker Message Delivery in Databases (Transact-SQL)
By default, Service Broker message delivery is active in a database when the database is created. When message delivery is not active, messages remain in the transmission queue. To determine if Service Broker is active for a database, check the is_broker_enabled column of the sys.databases catalog view.
Security Note |
---|
Activating Service Broker allows messages to be delivered to the database. A Service Broker endpoint must be created to send and receive messages from outside of the instance. |
To activate Service Broker in a database
- Alter the database to set the ENABLE_BROKER option.
Example
USE master ;
GO
ALTER DATABASE AdventureWorks SET ENABLE_BROKER ;
GO