views:

824

answers:

1

I have a Microsoft SQL server 2005 and I tried to enable Broker for myDatabase with those TSQL:

 SELECT name, is_broker_enabled FROM sys.databases -- checking its status 0 in my case
 ALTER DATABASE myDatabase SET ENABLE_BROKER

The alter database takes long time to process. Now it is over half hour and it is still running. Not sure if it is waiting for something else or I have to clean up anything (such as delete all the messages, contract, queue and services under service broker) first?

+5  A: 

http://rusanu.com/2006/01/30/how-long-should-i-expect-alter-databse-set-enable_broker-to-run/

alter database [<dbname>] set enable_broker with rollback immediate;
Remus Rusanu
I cannot get those rollback... commands working in SQL mgmt studio query. Syntax error.
David.Chu.ca
I've updated my post with the full syntax
Remus Rusanu