O'Reilly logo

Professional Microsoft SQL Server 2014 Administration by Brian Knight, Ross LoForte, Steven Wort, Bradley Ball, Adam Jorgensen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 6Service Broker in SQL Server 2014

WHAT'S IN THIS CHAPTER?

  • Processing data asynchronously
  • Configuring SQL Service Broker with T-SQL
  • Sending and receiving messages with SQL Service Broker

WROX.COM CODE DOWNLOADS FOR THIS CHAPTER

The wrox.com code downloads for this chapter are found at www.wrox.com/go/prosql2014admin on the Download Code tab. The code is in the Chapter 6 download and individually named according to the names throughout the chapter.

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 learn about 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 to databases on different servers.

ASYNCHRONOUS MESSAGING

At the heart of most high-volume systems is a queue that stores requests until resources are available to process them. A queue allows a limited number of worker threads to service requests from thousands of clients. A worker thread takes a request off the queue, processes it, and returns the result. The thread then proceeds to the next request on the queue.

This is significantly more efficient than starting a new thread to process each request as it comes in because it saves the startup and shutdown costs for the thread. Queues also allow more efficient use of resources because when the rate of ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required