Home > SQL Server Service Broker Tutorial and Reference Guide
Learning Guide:
EMAIL THIS

SQL Server Service Broker Tutorial and Reference Guide

01 Dec 2008 | SearchSQLServer.com

Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   

On his SQL Server with Mr. Denny blog, SQL Server expert Denny Cherry discusses the basics of SQL Server functionality. One topic he covers extensively is the SQL Server Service Broker, a message queue system with the same basic concept as the Microsoft Message Queue (MSMQ). Whether you are a newcomer to the Service Broker or a seasoned professional, this tutorial provides all the information you need to both setup and fine-tune this SQL Server addition.

This SQL Server tutorial will continue to be updated with content from SQL Server guru Denny Cherry, so please bookmark this page and check back for regular updates.

SQL Service Broker Tutorial and Reference

  → SQL Server Service Broker basics
  → Visit the SQL Server with Mr. Denny blog

   What is IT Knowledge Exchange?
IT Knowledge Exchange (ITKE) is a community of IT pros that share and pool their knowledge. You can ask your own IT question or share your expertise by answering a question. Do you have an IT problem that's driving you crazy? Come ask your peers and colleagues on IT Knowledge Exchange. You can even start your own blog and earn some cash for posting regularly.

  → Visit the ITKE Community Blog to learn how to get IT answers

  ↓ SQL Server Service Broker basics Table of Contents   

SQL Server Service Broker Overview
The SQL Server Service Broker is a message queue system that can give you guaranteed delivery order with single processing of messages -- always in the order received. Messages can be processed on demand or automatically via the queue activation.

SQL Server Service Broker Message Types
The message type is the first specific object in Service Broker. The message type defines the name of the message, and performs any validation Service Broker needs to do on the contents of the message prior to sending it.

SQL Server Service Broker Contracts
Every conversation in Service Broker needs a contract. The contract defines which message type or types will be used, as well as who can use these message types. The contract is specified when the conversation is created.

SQL Server Service Broker Queues
The SQL Server Service Broker queue is where messages are stored after they are delivered, but before they are processed. They are similar to tables, in that you insert data into them (sending the message) and view the data in them (receiving the message).

SQL Server Service Broker Services
SQL Server Service Broker services are used to bind contracts to queues. They are also used to bind database to database, or server to server routing of messages via routes.

SQL Server Service Broker Routes
SQL Server Service Broker routes are only needed when sending messages from one server to another. They define the SQL Server and TCP Port, which the sending SQL Server will connect to, in order to deliver the message.

SQL Server Service Broker SEND command
The SEND command is similar to the INSERT command, except it is used only with Service Broker. With Service Broker, you put data into a queue instead of a table. Instead of inserting a command into the queue, you send a message to the queue, much like sending an email to someone else.

SQL Server Service Broker RECEIVE command
The RECEIVE command in Service Broker gets the message out of the queue so you can process the data within the message_body column. Essentially, the RECEIVE command works just like the SQL SELECT statement.

SQL Server Service Broker message removal error
There is an issue with SQL Server Service Broker message removal that others may also have noticed. The conversations in the sys.conversation_endpoints DMV remain in a CONVERSING state rather than a CLOSED state.

Improving SQL Server Service Broker performance
In a high load SQL Server Service Broker environment, there is some impressive performance improvement that can be achieved by reusing the service broker sessions.

Monitoring the health of your SQL Server Server Broker
Here is a simple little query to see how backlogged your SQL Server Service Broker is.

   GOT IT QUESTIONS? YOUR PEERS HAVE ANSWERS
Your peers and colleagues have faced the same or similar problems.
So ask your own question on the IT Knowledge Exchange community.


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
Microsoft SQL Server Performance Monitoring and Tuning
Using traces in SQL Server Profiler
SQL Server Mailbag: CALs, witnesses and unwanted changes
SQL Server Mailbag: Data restoration and DB property management
Working with IntelliSense in SQL Server 2008 Management Studio
SQL Server Mailbag: Stored procedures, triggers and SSRS reports
Troubleshooting Distributed Transaction Coordinator errors in SQL Server
Clearing the Windows page file and its effect on server performance
Optimizing SQL Server indexes –- even when they're not your indexes
Performance implications of transaction log autogrowth in SQL Server
The short course on how SQL Server really works

Microsoft SQL Server 2005
End of life comes for SQL Server 2005 SP2, 2008
SQL Server Reporting Services Fast Guide
Tips for tuning SQL Server 2005 to improve reporting performance
SQL Server consolidation: Why it's an optimization technique
Parent-child dimensions in SQL Server 2005 with Analysis Services MDX
Enforcing data integrity in a SQL Server database
SSIS error message due to installation problem on SQL Server 2005
Should you upgrade to SQL Server 2005 or SQL Server 2008?
Basics for working with DATETIME and SMALLDATETIME in SQL Server 2005
How to configure Database Mail in SQL Server 2005 to send mail
Microsoft SQL Server 2005 Research

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
contiguity  (SearchSQLServer.com)
contiguous  (SearchSQLServer.com)
drilldown  (SearchSQLServer.com)
hashing  (SearchSQLServer.com)
hybrid online analytical processing  (SearchSQLServer.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary




Secure SQL - Data Security for Your Database
HomeNewsTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersIT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2005 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts