SQL Server Broker

I’ve been playing with SQL Server Broker services to allow me to notify my C# code when some data has been changed, but first you need to enable SSB (SQL Server Broker).  The easiest way of doing this is to us the following SQL statement:

alter database [<dbname>] set enable_broker with rollback immediate;

The reason for using rollback immediate is that the statement needs to have exclusive access to the database, and any connection has a shared lock on it, even when idle.