Appframe Knowledge Base


1 hits
1

How to enable service broker on database

--If you have two databases on the same server (i.e. backup of dev as test). The databases will have the same 
--broker identifier. Then run this statement before enabling the broker:
ALTER DATABASE <DATABASE> SET NEW_BROKER WITH ROLLBACK IMMEDIATE

--Enable Service Broker (run separately to ensure db is in single user mode)
ALTER DATABASE <DATABASE> SET SINGLE_USER WITH ROLLBACK IMMEDIATE
ALTER DATABASE <DATABASE> SET ENABLE_BROKER WITH ROLLBACK IMMEDIATE
ALTER DATABASE <DATABASE> SET MULTI_USER WITH ROLLBACK IMMEDIATE

sql · Perma link post comment Posted by: Jan Leon Sandslett (03-sep-2012)