You are not Logged in
Would you like to Login or Register

Today is: 03 September 2010
Check this months hot topics

Enabling Service Broker

The following T-Sql enables or disabled service broker on SqlServer 2005. The Service Broker is required by .net for SqlCacheDependency support

-- Enable Service Broker:
ALTER DATABASE [Database Name] SET ENABLE_BROKER;

-- Disable Service Broker:
ALTER DATABASE [Database Name] SET DISABLE_BROKER;

Is Service Broker enabled?

To determine whether or not Service Broker is enabled for a particular database, execute the following T-SQL

SELECT is_broker_enabled FROM sys.databases WHERE name = 'Database name';
-- Where 'Database name' is the name of the database you want to query.

is_broker_enabled will be 1 if Service Broker is enabled for the given database, otherwise it'll be 0.

kick it on DotNetKicks.com del.icio.us digg Mister Wong YahooMyWeb Reddit Furl Spurl blogmarks
Paul Hayman Skype
Author : Paul Hayman
Published : 01 August 2006

Paul is the COO of kwiboo ltd consultant and has more than a decade of IT consultancy experience. He has consulted for a number of blue chip companies and has been exposed to the folowing sectors: Utilities, Telecommunications, Insurance, Media, Investment Banking, Leisure, Legal, CRM, Pharmaceuticals, Interactive Gaming, Mobile Communications, Online Services. Paul is the COO and co-founder of kwiboo (http://www.kwiboo.com/) and is also the creator of GeekZilla.

Comments

Rishi kumkar said:

please tell me i have 2000SQL SERVER i am unable to eable the service broker please tell me

May 25, 2008 - 1:45 PM

Pappu Kangi said:

Service broker is not available in sql server 2000

June 25, 2008 - 10:00 PM

kusum singh said:

hi , i m using sql server 2005.

wen i try to enable service broker on my own database it shows me an error :

Msg 1205, Level 13, State 37, Line 1

Transaction (Process ID 54) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.

Msg 5069, Level 16, State 1, Line 1

ALTER DATABASE statement failed.

and system database do not face the same error . please assist.

January 26, 2009 - 7:27 AM

wendy said:

thank you very much!

March 16, 2010 - 6:12 AM

Tarun Gupta said:

hiii

i m using sql server 2005 and i want to send a message from one database to another database of a same system...

using service broker...

 please tell me
June 16, 2010 - 4:14 PM

Add Comment

Enter your comment below and it will be submitted for moderation.

Your Name

Add Tag

Please enter tags for this article, seperated by semi-colon ;

View Tag's by : # articles | # views

More Publications

Select Column Information using SQL Server
Dave Howard - 18/09/2006
Full Text Search in SQL 2005
Ric Hayman - 03/08/2006
GRANT Permissions on all of your Stored Procedures using a query
Paul Marshall - 16/06/2006
T-SQL script automatically adds auditing to a table
Dave Howard - 18/09/2006
Enabling Service Broker
Paul Hayman - 01/08/2006