Compartilhar via


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.

ms166086.security(en-US,SQL.90).gifSecurity 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

  1. Alter the database to set the ENABLE_BROKER option.

Example

USE master ;
GO

ALTER DATABASE AdventureWorks SET ENABLE_BROKER ;
GO

See Also

Tasks

How to: Deactivate Service Broker Message Delivery in Databases (Transact-SQL)
How to: Activate Service Broker Networking (Transact-SQL)

Other Resources

ALTER DATABASE (Transact-SQL)
sys.databases (Transact-SQL)
sys.transmission_queue (Transact-SQL)

Help and Information

Getting SQL Server 2005 Assistance