Tuesday, April 12, 2016

Service Broker and External Activator for Sql Server...

Introduced in Sql Server 2005, Microsoft's Service Broker is a Messaging Queue for Sql Server.  You can audit tables, trigger events, and even call web services (Using the External Activator).

Follow this excellent tutorial by Dev Kimchi which helps you step by step and clearly explain how to setup your Service Broker messaging queue.

To get started with the external activator you will require the version for the version of Sql Server you are running, click on any of the Microsoft download links and follow the install instructions:

Microsoft® SQL Server® 2012 Feature Pack
Microsoft® SQL Server® 2014 Feature Pack

One last thing before you get frustrated installing the External Activator service on a remote server.  At least for the 2012 version, it still required .Net 3.5 installed on the destination computer/server.  If you are trying to install on a Windows 2012 server follow this helpful guide on how to get .Net 3.5 installed now that the latest packs have been released...http://serverfault.com/questions/705702/installing-net-3-5-on-windows-2012-r2

Follow along and enjoy your journey,

Service Broker External Activator for SQL Server Step by Step


 Once you are done with the tutorial and you are happy with the results, you may notice the response queue begins to fill up.  What to do?

http://www.madeiradata.com/service-broker-asynchronous-triggers/
using the logic for closing the dialogs (SB_AT_CloseDialogs) you can set this procedure to clear out any completed dialogs (messages).  only the error messages will remain and allow you to troubleshoot by removing what's been processed.

Enjoy!