Chapter 6

Service Broker in SQL Server 2012

WHAT’S IN THIS CHAPTER

  • Processing Data Asynchronously
  • Configuring SQL Service Broker with TSQL
  • Sending and Receiving Messages with SQL Service Broker

This chapter reviews the various objects that make up the SQL Server Service Broker. As you move through the chapter you look at the various object types and how to create the objects. Toward the end of the chapter you examine the T-SQL code to use the objects when sending and receiving messages within the SQL Server database, between databases on the same server, and on different servers.

ASYNCHRONOUS MESSAGING

Asynchronous data processing is a foreign concept to most data professionals. In traditional data processing everything is done synchronously. A command is run, and a result is stored or sent back to the end user, or whatever the command is supposed to do. With asynchronous messaging the command is sent and will be processed later when the SQL Server gets around to processing the command. This can’t be done with traditional SQL commands, and you can’t just flip a switch to put a database into some sort of asynchronous mode. Using asynchronous messaging with SQL Server Service Broker requires a specific setup and configuration.

There are a variety of scenarios where SQL Server Service Broker can fill the role. SQL Server Service Broker has been successfully deployed in applications where it handles Extract, Transform and Load (ETL) between an OLTP database and a data warehouse ...

Get Professional Microsoft SQL Server 2012 Administration now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.