What’s New in BizTalk Server 2013 R2?

Support for:

• Windows Server 2012 R2, Windows Server 2012, Windows 8.1, Windows 7 SP1.

• Microsoft Office Excel 2013 or 2010.

• .NET Framework 4.5 and .NET Framework 4.5.1

• Visual Studio 2013

• SQL Server 2014 or SQL Server 2012 SP1

• SharePoint 2013 SP1

• WCF-WebHttp adapter now supports sending and receiving JSON messages. 

• SFTP adapter now supports two-factor authentication


BizTalk 2013 Licensing – cheaper? Maybe, maybe not!

Note this is not the official Licensing document for BizTalk Server! Please consult Microsoft before making any purchase decisions.


With the BizTalk 2013 (english locale) SKUs hitting the Microsoft sites for purchase in April. It is important to note an important change Microsoft have made to the BizTalk 2013 licensing model. Up till now (i.e. BizTalk 2010), BizTalk followed a per processor model (ie a physical socket) . With BizTalk 2013, Microsoft have changed the model to be per core. Just like SQL Server.

But what does core licensing mean? How does it affect your costs? For this, one must understand the concept of a core.

As per the wiki, a core is a central processing unit within a processor. So a dual core processor would have 2 cores, a quad core would have 4 cores and so on.

The above is a dual core processor with 2 cores.

The per processor model of licensing has its own problems. One could buy a processor license for a quad core processor and still end up paying for one processor and get the processing power of 4 processors. With the new model, a license has to be purchased for every core. That is 4 licenses would be required in this particular example. Core prices are costed as the 1/4 of the processor license cost.

Lets do some cost analysis between the two model for the same spec (prices are approx):

Per Processor (quad-core): ~$40,000 x 1 = ~$40,000

Per Core (quad-core):  ~$10,000 x 4 = ~$40,000

From the above, there is not much difference in this example. However, if you ended up using 5 cores for argument sake, what do the numbers look like between the two models?

Per Processor (quad-core + single core): ~$40,000 x 2 = ~$80,000

Per Core (quad-core + single core):  ~$10,000 x 5 = ~$50,000

There you have significant cost savings for almost $30,000 with the new model!

Some Key-points

  • All the cores in the server must be licensed.
  • Licenses can be purchased in pack of two.
  • Minimum of 4 core licenses required (if your server has less than 4 cores, ex: single core and dual core machines)
  • Actual number of core licenses required may vary based on processor type and core factor.


The estimated price for a core license is approximately $10,835 for Enterprise and $2,485 for Standard.

How do you calculate the cores?

In order to calculate the cores, core-factor must be understood. A core-factor is different for different brands of processors.

Type Core-factor
Single Core 4
Dual Core 2
AMD processors (6 cores or above) 0.75
All others 1

So if you were using a 12 core AMD processor, the license cost would be calculated as follows:

AMD: 12 cores x 0.75 = 9 core licenses required.

Intel: 12 cores x 1 = 12 core licenses required.


From the above, it is apparent that the licensing costs entirely depend on how BizTalk Server is deployed and the type of hardware. It affects different companies in different ways.

BAM_AN packages not executing by SQL jobs

I recently hit an issue with the BAM_AN packages executed through a SQL job  failing with the following message.

Object reference not set to an instance of an object.

at…. UpdateDataSourceAndGetAnnotation(String cubeName, String asServerName, String asDatabaseName, String ssServername, String ssDatabaseName)  

The reason was the account under which my SQL jobs were running did not have access to the Analysis Services. Solution was to right click on the root node –> properties and add the account under the security tab and it started working.

BAM: Regenerating data for non-RTA views

If you have log-shipped or moved your BAM databases to another environment, you might find that the legacy data in your non-rta view vanishes and only recent data is displayed.

This defeats the purpose of having scheduled aggregations to view data over months. However, there is a way to “reset” your cubes.

In the BAMPrimaryImport database, there is a table called ‘bam_Metadata_AnalysisTasks’. This table keeps track of range of records that the cube processed each time it ran. This range is also used to define the view ‘bam_<cubename>_CompletedInstancesWindow’ that is used to populated the staging tables for aggregation.

The trick is to delete all the records from this table in the BAMPrimaryImport database.

Delete from bam_Metadata_AnalysisTasks where CubeName=’<cubename>’


Insert INTO bam_Metadata_AnalysisTasks(CubeName,MinRecordID,MaxRecordID,LastStartTime,LastEndTime)


Note: Run the above queries for all the cubes in question. DO NOT RUN IN PROD BEFORE TESTING.

After executing the above command, run the corresponding BAM_AN_<cubename> package. After this has completed, browse to the BAM portal and you will see all historical data again.


BAMAlerts – The activation state cache could not be updated.

If you have log shipped or detached/attached the BAMAlerts databases, you will have issues starting the notification service on the BizTalk server for BAM alerts. The reason for this, when these databases are restored, the the ‘Cross-Database Ownership Chaining’ option on the BAMAlertsApplication and BAMAlertsNSMain databases is disabled and greyed out. Greyed out because it can only be enabled via a script.


To enable these options, run the following command (you need to be sys-admin):

–set chaining for a database

alter database BAMAlertsApplication set DB_CHAINING ON


alter database BAMAlertsNSMain set DB_CHAINING ON



Once done, you should be able to start the BAM alerts notification service on the BizTalk Server.

BizTalk Server 2010 R2 (TAP) Available

The latest version of BizTalk is available (CTP). This Technology Adoption Program (TAP) is for BizTalk Server 2010 R2, the 8th BizTalk Server release from Microsoft.
BizTalk Server 2010 R2 delivers enhancements in the following feature categories:
  • Electronic Data Interchange
    • Updated standards support
    • IaaS offering
  • Messaging
    • Ordered delivery enhancements
    • HL7 standards update
  • Enhanced Visual Studio 2012, SQL Service 2012, Systems Center 2012 experience
  • Support for SQL Server 2012 High Availability
  • Integration with Windows Azure Service Bus and Workflow
  • Addition of REST adaptor for integrating with Restful endpoints
  • BizTalk Server Cloud IaaS offering for development and test scenarios

You can signup if you interested in being a part of this release.

SignalR & BizTalk

For those who have never heard about SignalR, it is an async .net library for building real-time web applications. This sounds so interesting that it can actually open another dimension for applications requiring realtime updates via BizTalk.

SignalR helps pushing data from the server to the client (not just browser clients). SignalR makes it dead easy and handles all the heavy lifting for you.

There is a very interesting article by Kent Weare which talks about SignalR and how it can be used with BizTalk.


Retry pattern and Suspend shape – the gotchas!

I have just come out a frustration moment with BizTalk where it was behaving differently when compared to a similar environment. I have a retry pattern in one of my orchestrations and a suspend shape within the catch block. See screenshot below:

One would hope that when the administrator resubmits the suspended message, it would continue from the point it left of (that is continue in the loop). However, what I saw was, the orchestration would go into the “active” state indefinately.  Also, when trying to terminate this active instance, the terminate job would show as pending and the service wouldnt terminate unless the host was restarted.

Further investigation revealed that the suspended orchestration has no related message (or context). See screenshot below.

To eliminate any false positives, I deployed the same app on our test environment and saw that there was a message linked to the suspended orchestration.

This is where I was stumped!

After hours of pondering, I thought of the famous MBV! I ran some analysis via the MBV and I found this in the report:

The value “Missing Restart Msg in the Spool table…” was the light at the end of the tunnel. I quickly ran the Terminator tool to clean the messagebox.

Once done, I ran the MBV analysis again and all critical warnings were gone in relation to “Control Messages”.

I then tried my test again and saw the messages were now linked to suspended orchestrations….

On resubmitting, I would see the message continue from where it left off…

Hope this helps someone having similar issues.

Tracing and Tracking ESB events

Many a times one may feel the need to trace ESB events when using itineraries. This will enable you to see how a message is getting processed by the ESB itinerary resolver and if something is going wrong there. The process of enabling this switch is quite simple and it involves the following:


1) Open the BizTalk Configuration file, ie BTSNTSVC.exe.config

2) Add the following section (if one does not exist)  and save the file:



<source name=”BizTalk ESB Toolkit 2.0″ />



<add name=”BizTalkESBToolkit20″ value=”4″ />


<trace autoflush=”true” indentsize=”4″ >

<listeners >

<add name=”myListener”   type=”System.Diagnostics.EventLogTraceListener” initializeData=”BizTalk ESB Toolkit 2.0″ />




Add a Trace listener. If you don't already have a trace listener configured, add 1 of the many Trace listeners that come out of the box with the .Net framework: (Default, EventLog, TextWriter, Console, Text, etc.)
When using the EventLogTraceListener, the initializeData attribute must be set to the source of the Tracing Event. 
In this case it is the "BizTalk ESB Toolkit 2.0" source.

3) Restart the BizTalk Host Instance.

4) You will now see information and error events in the event viewer. Also if you have debugview running, you will see code traces there.


After enabling tracing, you might still feel the need for tracking. That is, what went where? Every Itinerary Service has a property called ‘Tracking Enabled’ which you’ve got to set it to ‘True’ during the design phase. This sets the stage for tracking an Itinerary Service. Set this property for every single service in an Itinerary as this is false by default. Only those services whose ‘Tracking Enabled’ property is set to true will show up in the database.

Ok, tracking is set to true and my itinerary is deployed. Where do I see this tracing information?

When a service in an itinerary is set for tracking, it is recorded in the BAMPrimaryImport database in the table bam_ItineraryServiceActivity_Completed. the column itineraryBeginTime should be used to sort the results by datetime.

This table gives a snapshot view of the trajectory of the message and if each stage in its path was completed or pending.

“the binary code for the script is not found…”

When you deploy a BAM activity, it creates at least one SSIS package for the activity which will create partition tables and move any activity instances within the archive window to the BAMArchive database.  If you’ve created any BAM views which create an OLAP cube, an SSIS package will also be created to move the data between the relational tables and the cube as well.  These SSIS packages are stored on the SQL server, in the MSDB database instance on the default server instance.

So SSIS needs to be installed on the SQL Server not the BizTalk server.  But what does need to be installed on the BizTalk server? See below…

You need to install:
1) Client Tools SDK
2) Client Tools Backwards Compatibility (this is critical).
+ the management tools as shown above.

I recently hit this issue while trying to run the BAM_AN_ SSIS package in SQL Server 2008 in order to load the activity data to the cube and got “the binary code for the script is not found”. What this means is the SSIS packages created by the BM utility has not been compiled. If you try and open the resulting dtsx package in Visual Studio, you are likely to see a dialog indicating that the package is corrupt. Lastly I had to  undeploy the existing BAM view and redeploy and the error went away!

Below are the screens I saw before and after installing the missing components.



Hope it helps someone!