---
title: "Service Broker in Sql Server 2005, 2008"  
description: "Service Broker in Sql Server 2005, 2008Service Broker is a message-queuing technology which allows developers to integrate SQL Server into distributed"  
author: "Chris Anderson"  
published: 2011-08-08  
updated: 2014-09-18  
canonical: https://www.mindstick.com/blog/218/service-broker-in-sql-server-2005-2008  
category: "database"  
tags: ["database"]  
reading_time: 2 minutes  

---

# Service Broker in Sql Server 2005, 2008

[Service Broker](https://www.mindstick.com/interview/1959/what-is-service-broker-in-sql) in [Sql Server](https://www.mindstick.com/articles/12999/what-is-table-valued-function-in-sql-server) 2005, 2008

Service Broker is a message-queuing [technology](https://www.mindstick.com/articles/13005/the-functional-aspects-of-laser-technology) which allows [developers](https://www.mindstick.com/blog/302688/handling-errors-in-rust-a-comprehensive-guide-for-developers) to integrate SQL Server into distributed applications. Service Broker is a feature which provides facility to SQL Server to send an [asynchronous](https://www.mindstick.com/blog/178/synchronous-and-asynchronous-command-execution-in-c-sharp-dot-net), transactional message. It allows a database to send a message to another database without waiting for the response, so the [application](https://www.mindstick.com/articles/12824/calculator-application-in-android) will continue to function if the [remote database](https://www.mindstick.com/articles/12843/reasons-why-hiring-remote-database-consulting-services-is-the-hottest-industry-trend) is temporarily unavailable.

The Service Broker consists of a number of SQL Server objects that represent the various [components](https://www.mindstick.com/blog/74096/understanding-the-role-of-some-integral-ac-components) of the asynchronous messaging system. A service is a set of tasks that is available, while message types represent the messages exchanged to complete a task. The messages are held in a queue and these messages are processed at predefined intervals and sent. Once the message has been sent, the application updates the data to indicate that the message has been sent.

**Enable service broker on database:**

-- Enable Service Broker:

\
ALTER DATABASE [Database Name] SET ENABLE_BROKER

**Disable service broker on database:**

-- Disable Service Broker:

ALTER DATABASE [Database Name] SET DISABLE_BROKER;

**Checking status of Service Broker**

SELECT is_broker_enabled FROM sys.[databases](https://www.mindstick.com/startup/34/airbyte-the-open-source-platform-simplifying-data-integration-for-warehouses-lakes-and-databases) WHERE name = 'Database name';

-- Where 'Database name' is the [name of the database](https://answers.mindstick.com/qa/96783/what-is-the-name-of-the-database-used-in-android) you want to query.

---

Original Source: https://www.mindstick.com/blog/218/service-broker-in-sql-server-2005-2008

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
