BizTalk Server 2013: Eliminating the Dependency on SQL Server 2005 Notification Services

By Nick Hauenstein

This post is the twenty-first in a weekly series intended to briefly spotlight those things that you need to know about new features in BizTalk Server 2013.

Over the last few years, I’ve had my fair share of times describing to people the installation/configuration process for BizTalk Server and more specifically the Business Activity Monitoring component. During those discussions, the oddball requirement for SQL Server 2005 Notification Services comes up and sparks a mild level of controversy: “Why would I need a component from an older version of SQL Server to use BAM Alerts?” Thankfully, with BizTalk Server 2013, I won’t be having that discussion as frequently.

It Looks Like You’re Writing a Letter, Do You Want Some Help?

BizTalk Server 2013 is now able to take advantage of SQL Server 2012’s Database Mail feature to send BAM Alerts. It’s pretty straight-forward to get all setup. You start by taking a trip over to SQL Server Management Studio, and choosing Configure Database Mail on the item of the same name under the Management folder in Object Explorer:

image

From there, you walk through a fairly straight-forward wizard to create a new profile and specify the SMTP server / credentials to use to send email:

image

While we specify the account here as bam@quicklearn.com – that’s ultimately NOT the address the alert will be delivered FROM (which instead will be bam@microsoft.com):

image

As a quick test (of both the settings entered throughout the remainder of the wizard, and the local SMTP server), I used the Send Test E-Mail feature to ensure all was happy with the setup (but this step isn’t 100% necessary):

image

And this email was the result:

image

What Does the BAM Side of Configuration Look Like?

Assuming you’ve already gone through the standard BizTalk Server Configuration wizard and enabled/configured all of the BAM related functionality, it becomes a matter of deploying the activity/views you’re interested in, and then enabling alerts for those views:

image

From there, the BAM Portal will expose the alert options within the UI. As an example, I created a quick BAM View that incorporated the concept of processing time – with the idea that if even a single item took too long to process, an alert would be triggered.

For an alert like this, the activity search page is a fine place to configure the parameters. Here we start with a query as if we are searching for an item where the processing time is greater than 5 seconds, but instead of executing the query directly, you can click Set Alert to use the query criteria as the basis for an alert:

image

After you click the button, it directs you to a page where you can define what the message looks like, and then after that is setup, to add subscribers for the alert. The subscribers can be either email boxes that will receive the notification, or a file share:

image

Prove That This Works

In order to follow through all the way (without SQL Server 2005 Notification Services), I quickly threw together some code to populate the activity with some data that should satisfy the alert condition, and cause the alert to fire:

image

After executing the code, I found this beauty sitting in the drop folder ready for delivery:

image

BAM!

So what are the limitations here (because there’s always a catch right)? Well, you can take this approach provided that you are using SQL Server 2012 along with BizTalk Server 2013. If you’re using SQL Server 2008 R2, then we still have to have that awkward discussion, where I link you over to the download page for the Feature Pack for SQL Server 2005 SP4 and then die a little inside.

BizTalk Server 2013 is trying to do things right, and make some of these stories cleaner, and more logical. There will be 3 more posts in this series to finish driving that home, and complete the grand tour of the new functionality. From there, we will look to development / course development battle stories, and also vNext functionality as information becomes available.

Until then, stay tuned!