Skip to content

Bits of .NET

Daily micro-tips for C#, SQL, performance, and scalable backend engineering.

  • Asp.Net Core
  • C#
  • SQL
  • JavaScript
  • CSS
  • About
  • ErcanOPAK.com
SQL

How to enable, disable and check if Service Broker is enabled on a database in SQL Server

- 14.01.22 - ErcanOPAK

To enable Service Broker run:

ALTER DATABASE [Database_name] SET ENABLE_BROKER;

To disable Service Broker:

ALTER DATABASE [Database_name] SET DISABLE_BROKER;

To check if Service Broker is enabled on a SQL Server database:

SELECT is_broker_enabled FROM sys.databases WHERE name = 'Database_name';

If the result is ‘1’, the Service Broker is enabled.

Thanks to zarez.net for this useful article.

Related posts:

What does COALESCE do in SQL?

SQL SARGability — The REAL Reason Your Indexes Don’t Work

Drag and Drop objects from Object Explorer to the Query Window in SQL Server

Post Views: 532

Post navigation

How to insert space in Razor Asp.Net
How to hide Youtube chat windows permanently

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

December 2025
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
293031  
« Nov    

Most Viewed Posts

  • Get the User Name and Domain Name from an Email Address in SQL (915)
  • Get the First and Last Word from a String or Sentence in SQL (798)
  • How to select distinct rows in a datatable in C# (772)
  • How to add default value for Entity Framework migrations for DateTime and Bool (772)
  • How to make theater mode the default for Youtube (586)
  • Add Constraint to SQL Table to ensure email contains @ (558)
  • How to enable, disable and check if Service Broker is enabled on a database in SQL Server (532)
  • Average of all values in a column that are not zero in SQL (505)
  • Find numbers with more than two decimal places in SQL (421)
  • How to use Map Mode for Vertical Scroll Mode in Visual Studio (416)

Recent Posts

  • VS “Breakpoints Hit Wrong Line” — The PDB Stale Cache Bug
  • WP “Menus Not Saving” — The Max Input Vars Killer
  • Windows 11 “Search Bar Broken or Empty” — Rebuild Index the RIGHT Way
  • Windows 11 “UI Stuttering” — The Hidden Hardware Accelerated GPU Scheduling Bug
  • AJAX “POST Works Locally but Not in Production” — HTTPS Mixed Content
  • JS “setInterval Drift” — Why Your Timers Run Slower Over Time
  • HTML5 “Broken Autofill Styles” — Chrome’s Yellow Background Bug
  • CSS “Z-Index Doesn’t Work!” — The Parent Stacking Context Curse
  • .NET Core “HttpClient Exhaustion” — Why Your API Suddenly Stops Responding
  • ASP.NET Core “Random 404 After Deploy” — Broken Routing Cache

Most Viewed Posts

  • Get the User Name and Domain Name from an Email Address in SQL (915)
  • Get the First and Last Word from a String or Sentence in SQL (798)
  • How to select distinct rows in a datatable in C# (772)
  • How to add default value for Entity Framework migrations for DateTime and Bool (772)
  • How to make theater mode the default for Youtube (586)

Recent Posts

  • VS “Breakpoints Hit Wrong Line” — The PDB Stale Cache Bug
  • WP “Menus Not Saving” — The Max Input Vars Killer
  • Windows 11 “Search Bar Broken or Empty” — Rebuild Index the RIGHT Way
  • Windows 11 “UI Stuttering” — The Hidden Hardware Accelerated GPU Scheduling Bug
  • AJAX “POST Works Locally but Not in Production” — HTTPS Mixed Content

Social

  • ErcanOPAK.com
  • GoodReads
  • LetterBoxD
  • Linkedin
  • The Blog
  • Twitter
© 2025 Bits of .NET | Built with Xblog Plus free WordPress theme by wpthemespace.com