Dan Crawford<br />Integrated Network Strategies<br />dcrawford@insindy.com<br />SQL Server Service Broker<br />
Asynchronous Messaging<br />Queue Processing - FIFO<br />What is Service Broker?<br />
Highly variable workload<br />Long running transactions without blocking user interface<br />Delayed execution<br />Fault ...
MSMQ (Microsoft Message Queue)<br />Queued Components<br />BizTalk<br />WebSphere MQ/Message Broker<br />Amazon Simple Mes...
Which to choose?<br />
Message Type<br />Contract<br />Service<br />Queue<br />Schema<br />Dialog/Conversation<br />Conversation Group<br />Compo...
Create the database<br />Enable Service Broker<br />Create Master Encryption Key<br />	“Service Broker needs to access the...
Create message type(s)<br />Create contract<br />Create initiator and target queues<br />Create services<br />Building the...
Logic to send initiating message<br />Process message and send response<br />Receive response<br />Building the “applicati...
CREATE QUEUE [dbo].[qDemo1] <br />	WITH STATUS = ON , <br />		RETENTION = OFF , <br />		ACTIVATION (  STATUS = ON , <br />...
Conversation Priority<br />Huge improvements in Management Studio<br />Service Broker diagnostic utility<br />Improvements...
Locking<br />Error handling<br />Poison messages<br />Keep scripts for dropping/creating SB objects<br />Things that will ...
Pro SQL Server 2008 Service Broker – Apress<br />SQLOnline Documentation<br />Google<br />Service Broker Resources<br />
And they lived happily ever after…<br />
Upcoming SlideShare
Loading in …5
×

SQL Server Service Brokers

3,693 views
3,467 views

Published on

Introduction to SQL Server Service Broker technology

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
3,693
On SlideShare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
61
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

SQL Server Service Brokers

  1. 1. Dan Crawford<br />Integrated Network Strategies<br />dcrawford@insindy.com<br />SQL Server Service Broker<br />
  2. 2. Asynchronous Messaging<br />Queue Processing - FIFO<br />What is Service Broker?<br />
  3. 3. Highly variable workload<br />Long running transactions without blocking user interface<br />Delayed execution<br />Fault tolerance<br />Flexibility in scaling/processing spread across multiple systems<br />Why Use Asynchronous Messaging?<br />
  4. 4. MSMQ (Microsoft Message Queue)<br />Queued Components<br />BizTalk<br />WebSphere MQ/Message Broker<br />Amazon Simple Message Queue (SQS)<br />SQL Server Service Broker<br />Asynchronous Messaging Options<br />
  5. 5. Which to choose?<br />
  6. 6. Message Type<br />Contract<br />Service<br />Queue<br />Schema<br />Dialog/Conversation<br />Conversation Group<br />Components of Service Broker<br />
  7. 7.
  8. 8.
  9. 9. Create the database<br />Enable Service Broker<br />Create Master Encryption Key<br /> “Service Broker needs to access the master key in the database &apos;SB_Demo&apos;. Error code:26. The master key has to exist and the service master key encryption is required.”<br />Building the “application”<br />
  10. 10. Create message type(s)<br />Create contract<br />Create initiator and target queues<br />Create services<br />Building the “application”<br />
  11. 11. Logic to send initiating message<br />Process message and send response<br />Receive response<br />Building the “application”<br />
  12. 12. CREATE QUEUE [dbo].[qDemo1] <br /> WITH STATUS = ON , <br /> RETENTION = OFF , <br /> ACTIVATION ( STATUS = ON , <br /> PROCEDURE_NAME = [dbo].[ProcessDemoQ] ,<br /> MAX_QUEUE_READERS = 4 , <br /> EXECUTE AS OWNER ) <br />ON [PRIMARY] <br />Activation<br />
  13. 13. Conversation Priority<br />Huge improvements in Management Studio<br />Service Broker diagnostic utility<br />Improvements in SQL Server 2008<br />
  14. 14. Locking<br />Error handling<br />Poison messages<br />Keep scripts for dropping/creating SB objects<br />Things that will bite you in the butt<br />
  15. 15. Pro SQL Server 2008 Service Broker – Apress<br />SQLOnline Documentation<br />Google<br />Service Broker Resources<br />
  16. 16. And they lived happily ever after…<br />

×