How to: Deactivate Service Broker Message Delivery in Databases (Transact-SQL)
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 |
---|
Deactivating Service Broker prevents messages from being sent from or delivered to the database. However, this does not prevent messages from arriving in the instance. To prevent messages from arriving in the instance, you must remove or stop the Service Broker endpoint. |
To deactivate Service Broker in a database
- Alter the database to set the DISABLE_BROKER option.
Example
USE master ;
GO
ALTER DATABASE AdventureWorks2008R2 SET DISABLE_BROKER ;
GO