My Techie Blog

  Home  |   Contact  |   Syndication    |   Login
  105 Posts | 5 Stories | 404 Comments | 0 Trackbacks

News

Archives

Post Categories

ADO.NET

Ajax

API/WebServices

ASP.NET Resources

BizTalk Server

Blogs I read

Free Books

How to

iOT

JavaScript

JQuery

JSLink - SharePoint

JSON

LINQ

Misc

Mobile BI

MS Business Inteliigence

Reporting Services

Responsive/MVC ASP.NET

SEO

Sharepoint Resources/Tools

SharePoint 2010 Branding

SharePoint 2010 Videos

SharePoint 2013

SilverLight

SPServices

SQL Server

Sql Server 2012

SSIS

Web Optimization Tools

Web Performace Tools

Windows 8

Windows Azure

Windows Azure

Windows Phone

WorkFlows

WSS V3

xml

I was in the process of using SqlSiteMapProvider class today by jeff which is a new feature of ASP.NET 2.0 and i have always wanted to try this out
My main goal is to have a database driven site navigation interface with a securitytrimming feature which i know is possible

But after running the sql script to insert some sample tables to the DB and setting upt the project in VS 2005.
Ran F5 to run a sample page  and bingo error:

The SQL Server Service Broker for the current database is not enabled

After doing some search i saw a post that said you just have to run the below from query analyzer:

ALTER DATABASE DatabaseName SET ENABLE_BROKER;

But the query kept running for minutes and never stopped.So i taught there must be some conflicts.
So i started looking for a way to force the close off conflicting sessions.

So i ran
ALTER DATABASE DatabaseName SET NEW_BROKER WITH ROLLBACK IMMEDIATE;
and then
ALTER DATABASE Databasename SET ENABLE_BROKER;

and then the query ran successfully

make sure you run:

SELECT is_broker_enabled FROM sys.databases WHERE name = 'DatabaseName'

to get the correct value : is_broker_enabled = 1

Hope that helps

 

posted on Wednesday, October 15, 2008 6:18 PM

Feedback

# re: The SQL Server Service Broker for the current database is not enabled -when using SqlCacheDependency 4/24/2009 7:14 AM Paul
Thanks a lot for posting the solution, saved me a lot of time!

# re: The SQL Server Service Broker for the current database is not enabled -when using SqlCacheDependency 6/10/2009 3:44 PM Nelly
Thank you!

# re: The SQL Server Service Broker for the current database is not enabled -when using SqlCacheDependency 8/14/2009 6:34 AM DotNetGuts
You are awesome.

That was really helpful.

Many Thanks.

# re: The SQL Server Service Broker for the current database is not enabled -when using SqlCacheDependency 11/12/2009 1:00 PM Jason Frain
Thank you very much. Its very kind of you to share this information.

# re: The SQL Server Service Broker for the current database is not enabled -when using SqlCacheDependency 11/24/2009 6:06 AM snopbear
thanks from my heart it's very helpfull

# re: The SQL Server Service Broker for the current database is not enabled -when using SqlCacheDependency 1/13/2010 6:46 AM Itay Blustein
Thanks a lot!!!
Finally someone who's answer is short and good!
g'day!

# re: The SQL Server Service Broker for the current database is not enabled -when using SqlCacheDependency 2/5/2010 4:40 AM Magnus
Cheers for the straight to the point post, saved me loads of time :)

# re: The SQL Server Service Broker for the current database is not enabled -when using SqlCacheDependency 4/7/2010 4:27 PM Better Gnomes and Gardens
Very cool. Worked like a charm

# re: The SQL Server Service Broker for the current database is not enabled -when using SqlCacheDependency 5/15/2010 5:16 PM Ryan White
Thank you. It worked great and was quick and easy to follow.

# re: The SQL Server Service Broker for the current database is not enabled -when using SqlCacheDependency 6/14/2010 1:25 PM dumbo167
It's awesome. Thanks

# re: The SQL Server Service Broker for the current database is not enabled -when using SqlCacheDependency 7/29/2011 7:35 AM someguy
You're a boss.

# re: The SQL Server Service Broker for the current database is not enabled -when using SqlCacheDependency 8/16/2012 9:07 AM Steve
Thanks worked great

# re: The SQL Server Service Broker for the current database is not enabled -when using SqlCacheDependency 1/22/2014 9:56 PM Christine
I had the error message, but when I ran the Enable broker command it said it was already enabled. Your post to set the new broker did the trick.
Thanks - great work.

Post A Comment
Title:
Name:
Email:
Comment:
Verification: