Posts Tagged ‘BizTalk’

BizTalk Server databases and their health are very important for a successful BizTalk Server database messaging environment. BizTalk is shipped out with a total of 13 SQL Agent jobs that perform important functions to keep your servers operational and healthy.

Like any other system, all BizTalk Server databases should be backed up and BizTalk Server will provide out-of-the-box a job for accomplished that: Backup BizTalk Server (BizTalkMgmtDb) job.

This job makes both Full and Log backups. By default the Backup BizTalk Server job performs a full backup once a day and performs log backups every 15 minutes. This means that once the full backup is performed you need to wait 24 hours for it to automatically do another full backup of the BizTalk Server databases… even if you try to manually run the job, it will only make the backups of the log files.

But sometimes we need, for several reasons, to have the ability and the possibility to force a full backup:

  • We will have some maintaining plan on the server, or apply a new configuration, and we want to backup the environment
  • Or simple we will install a new integration application and again we want to have a backup in this exact moment

Each company have is policies, so again for several reasons, we sometimes need to force a full backup of all BizTalk Server databases.

The standard way is to use the “BizTalkMgmtDb.dbo.sp_ForceFullBackup” stored procedure. However, and unlike what many people think, this stored procedure does not perform a full backup it only marks internally on BizTalk Server databases that the next time the Backup BizTalk Server job runs it will need to perform a full backup of the data and log files.

All BizTalk Admins know this (if they don’t know, they should!), however sometimes we need to really on DBA Admins to perform this task, and do not misunderstand me, I have nothing against DBA! All the BizTalk Administration team should be composed by several element with different skills: DBA Admins, network admins, Sys Admins and a BizTalk Admins… each playing its role. But sometime DBA don’t really understand the BizTalk infrastructure and BizTalk Administrator should have an important role advising and helping them (like in other situations it will be the opposite).

And because this is not a day by day task people tend to forget all the steps and sometimes they will create custom scripts to perform this task, but you really need to be aware of two important things:

  • The Backup BizTalk Server job is the only supported method for backing up the BizTalk Server databases. Use of SQL Server jobs to back up the BizTalk Server databases in a production environment is not supported.
  • You can use the SQL Server methods to backup the BizTalk Server databases only if the SQL Server service is stopped and if all BizTalk Server processes are stopped.

So to help one of my DBA teams I end up creating this job that is composed by two steps:

  • Step 1: Force Full Backup
    • That will call the “BizTalkMgmtDb.dbo.sp_ForceFullBackup” stored procedure
  • Step 2: Backup BizTalk Server
    • That will call the standard Backup BizTalk Server (BizTalkMgmtDb) job


Note: Of course this custom job should be disabled and manually executed when you need it!

Hope you find it useful

You can download the custom “Force Full Backup BizTalk Server (BizTalkMgmtDb)” Job from:

Force Full Backup BizTalk Server (BizTalkMgmtDb) Job (863 bytes)
Microsoft | TechNet Gallery


2013 was a big year for us in term of events: BizTalk Summit 2013 London, Oporto BizTalk Innovation Day, Bouvet Innovation Day and finally BizTalk Innovation Day Italy… but we promise that 2014 would start even bigger and better!

Nearly 200 attendees (an increase of 56% compared with the previous year), more than 100 different companies across 20 countries were present in this event. 12 Microsoft Integration MVP’s from across the world (USA, Canada, India, Netherlands, Norway, Portugal, Italy, Belgium and of course UK) and 2 members of Microsoft Product group were present as a speakers! These are some of the numbers that reflect the huge success of this event!


And viewing all the comments (Day 1 and Day 2 summary from tweets, what did the attendees say)… we did it! Of course this was not possible without all the effort and commitment of Saravana Kumar and all his BizTalk360 team (~6 months on this project) that make this a remarkable event!

The journey

As almost of the speakers and many attendees, I arrived on Saturday, March 1, thereby enjoying the weekend to meet London city a little more and chat with my fellows MVPs and members of the BizTalk Community.


The event

My session was on the second day of the event in the afternoon. And was all about BizTalk Mapping Patterns where I tried to address and explain some common mapper problems, specifying best practices and some of the best ways to address common problems by choosing the right approach and a small introduction to WABS maps where I address the key differences between BizTalk Server and BizTalk Services maps, key problems in migrating BizTalk Server to BizTalk Services maps and some WABS maps samples.


Unfortunately, because time restrictions, I had to be very brief showing only key concepts and not getting deep on many of the topics. But in overall I was pleased with the end result and all the people, and people can find out more details on this topics when my eBook become available.

But let’s go back to the beginning…

Day 1

The first day started at 7am with the registrations progress which occurred very smoothly. And after a quick kick off at 8:45 by the hand of Saravana Kumar the Microsoft Product Group took the stage, first by Guru Venkataraman that start his presentation by saying “On-prem is real and here to stay!” and also explaining the BizTalk Server roadmap and the new version: BizTalk Server 2013 R2 that they are preparing and the Windows Azure BizTalk Services roadmap.

Being succeeded by Harish Kumar Agarwal that explain in detail all the Windows Azure BizTalk Services features updates that went into the February release.


After the Microsoft Product Group was time for the Microsoft integration MVPs to take the stage for them, two more sessions were carried out in the morning:

  • Jon Fancey presented a session about how you can move to BizTalk Services, explaining the advantages and challengers you can expect in moving to the cloud
  • And Saravana Kumar cover in his session some of the key capabilities of BizTalk360 and demonstrated how to improve your operations (monitoring and management) in your BizTalk environment using BizTalk360.


The afternoon started with a monster on the stage that don’t need any introduction: Richard Seroter that gave us an overview of the existing integration tool and how to choose the right one for the right scenario. However Richard was not alone and was followed by two great session:

  • Tord Glad Nordahl with an excellent and kind of provocative (in a good sense and intentional) session about How we/you can mess up the BizTalk environments! Proving excellent tips and tricks not only for admin but also to developers in what you can do and should avoid doing.
  • And Stephen W. Thomas that gave us a look at Windows Azure IaaS and how best to leverage it with BizTalk Server 2013. Providing also awesome PowerShell scripts to configure and manager your VM in the cloud.

BizTalk-Summit-2014-Richard-SeroterBizTalk-Summit-2014-Tord-NordahlBizTalk-Summit-2014- Stephen-Thomas

And finally the day 1 finish with a Q&A session with Microsoft Product Group and a couple of MVP’s, special reference to the presence of Michael Stephenson on this session:


After that was time to talk with the attendees, some social network with some beers and a speaker dinner’s at Browns.


Day 2

The second day started at 9am with four amazing sessions carried out in the morning:

  • The first one that took the stage was Kent Weare that give us a look to the mobile services, presenting a real world business scenario using many of Windows Azure building blocks like Azure Service Bus and Azure Mobile Services; and BizTalk Server 2013
  • Steef-Jan Wiggers was the second, and as always he made a great session about Manageability of Windows Azure BizTalk Services were he focused on the tools that are available for managing WABS solutions.
  • Is not every day that you can see a session about BAM, and I personally like this topic, and Dan Rosanova was the person responsible for this topic! And what a great job. It was one of my favorite’s talks/topics! He was able to walk through and show us real world BAM implementations covering all the key concept of BAM.
  • The last in the morning was Johan Hedberg, who lost a bet and had to wear a Canada shirt during his presentation, but he was not intimidated and made a good session on how to use BizTalk Server together with SQL Server Master Data Services.


The afternoon started, in my personal opinion, with the best session of the event and with an “animal” on the stage: Nino Crudele, in addition of captivate and put the whole audience laughing, Nino was able to present an awesome add in to Visual Studio “btsgnosaddin” that will make the lives of all BizTalk developers much better and easy! This will be a tool that all BizTalk developers must have!

This session was followed by two more sessions:

  • Sandro Pereira (me) who better than me to succeed my good friend Nino Smile.
  • And the last one to take the stage was Sam Vanhoutte that gave us a session about Running durable workflows in the cloud and on prem. Providing an overview of Workflow Manager and showing awesome hybrid demo applications using Twilio.


Once again, for me it was excellent and an honor to participate in this event along with all these amazing people that were responsible for this happens: the speakers and the BizTalk Crew, Microsoft, BizTalk360 crew members and special all the attendees!

After the event

After the event was time to relax and enjoy the last night in London in the company of friends and fellow BizTalk Community members.


Stay tuned on the BizTalk Innovation Day Facebook page to learn more about our upcoming events!

Key point/resources to take into considerations
  1. btsgnosaddin” addin to Visual Studio that will be provided by Microsoft Integration MVP Nino Crudele for free!
  2. PowerShell scripts to configure and manager your VM in the cloud that will be provided by Microsoft Integration MVP Stephen W. Thomas for free!
  3. BizTalk Mapping Patterns and Best Practices eBook that will be provided by Microsoft Integration MVP Sandro Pereira (me) for free!
  4. All the session will be available online soon in the BizTalk360 webpage

Unlike schemas that you will be able to directly take your BizTalk Server schemas and use them in you WABS solution, BizTalk Maps needs to be migrated because despite the Transform Designer (mapping tool used for WABS) and the BizTalk Mapper Designer looks mostly the same in terms of layout and user experience, they are quite different and the underlying map format is different. Basically when we are using BizTalk Mapper Designer the transformation are created using XSLT, however with Transform Designer the transformation are created using Extensible Application Markup Language (XAML).

Also the available functoids, that are now called Operations, are different as well. Not all the functoids available in BizTalk Server are available as map operations in Azure BizTalk Services and there are new Operations that doesn’t exist in BizTalk Server like: several List Operations, DateTimeReformat, GetContextProperty and so on. And despise XSLT and custom C# are supported the concept of “Scripting” map operation in Azure BizTalk Services Transforms are limited comparing to BizTalk Service for example:

  • You cannot use custom inline XSLT, you only can custom XSLT code directly to override WABS map, similar to the “Custom XSLT Path” map grid properties in BizTalk Server.
  • You can only use CSharp Scripting inside WABS maps.

Because of all this reasons you cannot directly use a BizTalk map in Azure BizTalk Services.

Basically you have two options that you can use to migrate BizTalk maps:

  • By using custom XSLT code gathered from your BizTalk Maps (…the easy way)
  • Or by using the BizTalk Map Migration Tool provided by Microsoft.

Using BizTalk Map Migration Tool

This is a command line tool, provided by Microsoft that takes a BTM File as input and that will try to produces the new mapper (.trfm) file as an output.

I’m saying “that will try” because there are many limitations present like:

  • Certain functoids may not get converted by this tool, for example some Scripting and Custom functoids from BTM way cannot be converted. In this case they are converted to arithmetic expression functoid in the TRFM map with the expression value as empty.
  • Links to functoids, which cannot be converted successfully, are denoted as empty inputs in the new TRFM functoids.
  • Certain features that are not supported, yet, in TRFM, will not be converted properly. For example, links from xs:extension node(s) are not converted to TRFM
  • Certain conditional mapping are not converted as expected as these features are not yet implemented in the Transforms
  • And so on.

At the end this tool will generate a conversion process report (Report.txt) listing out the failed conversions.

Also in terms of Organizing and Documenting Maps there are two drawbacks presents:

  • Labels and comments from the BTM functoids are not mapped onto the TRFM functoids
  • The multiple pages from BTM are translated to a single page in the TRFM map to ensure all operations within a scope are within a page.

The BizTalk Map Migration Tool is available on Codeplex at BTM Migration Tool, but before you use this tool you need to know that:

  • This tool expects that the machine on which it’ll run would have both products installed: BizTalk 2010 or above and Windows Azure Biztalk Services.
  • And the schemas should be present as expected by the BTM map (in the relative folders).

The BTM Migration Tool is a command line tool that uses the following parameters:

  • A BizTalk map (.btm)
  • Optional. Resulting BizTalk Service project Transform (.trfm)


Let’s look at one very easy example and analyze the end result. In this scenario we have two different records, Client and Employee, and we want to map all the man’s clients and employees to Person (Sex == M). This is look of the BizTalk Server maps:


When we apply the BTM Migration Tool it will generate this nice WABS map for us:


And the good news in this case, if we try the map it will successfully work and it will produce the tight output! (Yes I looked for a good sample). However is this the perfect output?

So let’s try change this to get only the female sex present in the input message. It seems an extremely easy change to make… we just need to go to the Logical Operation present in each MapEach Loop Operation and change the condition


However surprisingly the output instance after this change is empty


So why this happens? In this case, after looking to all the shapes, I found out that the MapEach Loop operation also as the same condition that is present in the Logical Operation that we need to change, as you can see in the picture bellow:


Can this map be improved?

The aim here is not to explain the functionalities of the new map and how the new operations works, however if you look at the map generated by the compiler, at least in this case, you can easily identify that we can simplify the map to be more easy to read and to maintain, by:

  • Maintaining the condition in the MapEach Loop operation
  • Suppress all the Logical and Conditional Assignment Operations that are inside the MapEach Loop operation
  • And use direct links to map the Name and Sex



So as a final note, even if the migrator tool did a decent job, you should always try to identify some bottlenecks, problems or overlaps and simplify it

Using Custom XSLT Code

Migrating maps from BizTalk Server solutions to Azure BizTalk Services could be one of the more complex artifacts to migrate (depending on map complexity)… or not!

The good news is that, you don’t necessary have to remake or migrate our BizTalk map to WABS map. As I mention earlier WABS maps support custom XSLT code, you can use a custom external XSLT file, similar to the “Custom XSLT Path” map grid properties in BizTalk Server to override WABS map and use custom XSLT to make the entire map transformation.

I try to avoid using Custom XSLT files for solving a mapping problem, for many reasons, however there are always exception. I do recommend using custom XSLT files:

  • If you are dealing with huge message and High Performance is one of the primary requirements (and even then this maybe can be avoid)
  • Or if you already have a custom XSLT file provided by another team, or from another system that you can re-use in your map. In this case don’t try to reinvent the wheel!

And because we are migrating a BizTalk Server map we already have the XSLT, so for me there is no point spending a few and in some case many hours trying to remake the same transformation in a different editor.

To extend your WABS maps to use custom XSLT code you must:

  • Go to the grid properties (or also call Transform design surface properties) in the Transform Designer, where you can see that there is a XSLT property in which we can extend the map to use custom XSLT code


Note: This time Microsoft did a nice work and if you notice in the grid page there is message that will help you.


  • In Properties, click XSLT, and click the ellipses (…). A Configure XSLT dialog window is opened.


  • To import an existing XSLT file, click Import XSLT. Browse to the .xslt or .xsl file and click Open. The imported XSLT populates the Configure XSLT dialog window. OR, enter the XSLT syntax in the Specify the XSLT below … window.


  • Optional. To import an existing XML extension file, click Import EXTXML. Browse to the XML file and click Open. The imported XML populates the Specify the extension objects … dialog window. OR, enter the XML syntax in the Specify the extension objects … window.
  • Optional. Click Use XslCompiledTransform for better performance to transform XML data by compiling XSLT style sheets and executing XSLT Transforms. When the style sheet is compiled, it can be cached and reused. Otherwise, the XslTransform class is used; which is best when executing a Transform on one occurrence.
  • Click OK.

When XSLT is used, the Transform design surface is grayed out. XSLT can be specified for every Transform file (.trfm).


How do I generate XSL output from the BizTalk Mapper Designer?

To generate a XSLT file that represent you BizTalk Map you just need to:

  • Open the BizTalk map in Visual studio
  • Right click on the map and select “Validate Map” option, this operation will generate the XSLT and you can see the path of generated XSLT in output window.

You can use this XSLT, without change it in most of the cases, to add in your WABS Maps.

Code Samples

All of this sample can be found and downloaded in Microsoft Code Gallery:

For the third consecutive year, BizTalk Innovation Day event will be conducted in several European cities. And like last year the tour will start with our major event that is back to London even bigger and better!

  • 12 Integration MVP’s from across the world (USA, Canada, India, Netherlands, Norway, Portugal, Italy, Belgium and of course UK) will be speaking in this event.
    • The BizTalk Crew
      • Nino Crudele [Italy]
      • Saravana Kumar [UK] – the event host
      • Steef-Jan Wiggers [Netherlands]
      • Tord Glad Nordahl [Norway]
      • And me [Portugal]
    • Dan Rosanova [USA]
    • Jon Fancey [UK]
    • Michael Stephenson [UK]
    • Richard Seroter [USA]
    • Sam Vanhoutte [Belgium]
    • Stephen W. Thomas [USA]
    • Kent Weare [Canada]
  • Once again Microsoft Product group will be speaking in this event and will bring some of the core content presented in “BizTalk Integration Summit” held in Seattle last year or even new stuff to European audience.
  • Approximately 220 attendees expected from all over the Europe (or why not all over the world). Which means that we can interact and exchange ideas, not only with MVP and the product team, but also with two hundred BizTalk Experts!!!

BizTalk Summit 2014, London event will be organized by BizTalk360 (Kovai) limited with co-operation from Microsoft Product group, Microsoft UK and Microsoft Integration MVP’s.


This will be a two day event purely focused to the Microsoft Integration stack: BizTalk Server, Windows Azure BizTalk Services, Service Bus and Mobile Services. So we invite you all to join us next 3rh March 2014 in London, England. The event will once again take place in Microsoft (Cardinal Place), 100 Victoria St, SW1E 5JL London.

Programar-edicao-37The event only accommodate a limited number of attendees due to logistical constraints and is almost sold out! However there are still a few tickets available. So if you are interested please go ahead and confirm your seat as soon as possible, this will easily be the biggest Microsoft Integration event in Europe this year with a lot of new content.

You can find all detail about this event here.

About my session…

Last year I had the opportunity to introduction Windows Azure BizTalk Services (at the time Azure Service Bus EAI/EDI Labs), this year I will address a topic that I especially love and that I have presented in previous BizTalk Innovation Day events, however slightly different from the previous ones: “BizTalk Mapping Patterns and an Introduction to WABS maps“- this is mainly a session focused for developers. Here is the session’s abstract:

Maps or transformations are one of the most common components in the integration processes. They act as essential translators in the decoupling between the different systems to connect.
In the last couple of month I have been writing a free eBook about “BizTalk Mapping Patterns and Best Practices” that will soon be released, and this will be a good opportunity for you to see what you can expect. In this session I will try to address and explain some common mapper problems, specifying best practices and some of the best ways to address common problems by choosing the right approach. For me there is no perfect solution to solve a particular mapping problem, and most of the times we can find several ways to solve it depending on the experience and knowledge that we have or technologies and tools that we like to use, but all of them have advantages and disadvantages. Not always the best solution is the best approach to address the problem, you must understanding the problem and the requirements, researching the available options and taking actions to achieve your goals sometimes base on:

  • What’s the best approach to have performance? Is my message so big that I really need to worry about performance? Do I really need High performance?
  • Can I easily maintain this map? It is easy to read and understand? What the estimated effort for debug, finding and fix problems?
  • What the expertise levels required to create and maintain this map approach? What much time do I need to develop?

Finally I will try to make an introduction to the Windows Azure BizTalk Service maps, at the first glance the map editor seems to be the same that we used in BizTalk, but although the concept be the same this is a very different editor. And hopefully you will enhance your skills when using BizTalk Server and WABS Mapper editor.

Let’s see a glimpse for what you can expect:

BizTalk-Mapping-Patterns-and-Best-Practices-eBook Aggregator-Pattern

Working-with-Name-Value-Pair-Structures WABS-Maps

Last year was like this….

128 attendees, more than 70 different companies across 16 countries (Austria, Belgium, Denmark, France, Germany, Italy, India, Ireland, Netherlands, Norway, Portugal, Spain, Sweden, Switzerland, UK, USA), more than 10 Microsoft Integration MVP’s present (speakers, Q&A members and attendees) and 3 members of Microsoft Product group, these are some of the numbers that reflect the huge success of this event! This was the first time in UK that was been conduct a full day event dedicated to Microsoft BizTalk Server.


Check more here and in our Facebook page.

When we configure Deployment Settings in Visual Studio projects, our database settings (“Configuration Database” and “Server”) and BizTalk Settings (“Application Name”) are only stored in a personal “*.btproj.user” file. By default these files are ignored in your check-ins, but that may not be the desired effect. We recommend that those settings are also stored in your source control (forever) to preserve testing configurations and help you and other team members pick your archived project easily.

In one of my previous post, “Failed to add resource(s). Resource (…) is already in store and is either associated with another application or with another type”, I explained a common deployment problem that can happen when we work with BizTalk Server project and Team Foundation Server. In this post I will try to explain how can we avoid this problem and how can we store deployment settings in TFS so that can be shared by our team members.


Firstly, is important for you to know that Visual Studio, I believe since BizTalk 2009 onwards, stores the deployment setting of BizTalk projects in the Project user option file: “*.btproj.user” file. This is a XML file that contains not only the BizTalk deployment Settings but also several personal user settings like References path, test file names and so on.

Regarding to BizTalk deployment properties all this setting are stored in the “*.btproj.user” file:

  • Application Name (ApplicationName): Is the name of the BizTalk application that we want to deploy the assemblies in this project. If the application already exists, the assemblies will be added to it when you deploy the project. If the application does not exist, the application will be created. If this field is blank, the assemblies will be deployed to the default BizTalk application in the current group (“BizTalk Application 1”). Names that include spaces must be enclosed by double quotation marks (“).
  • Configuration Database (ConfigurationDatabase): Is the name of the BizTalk Management database for the group, the default value is “BizTalkMgmtDb”.
  • Server (Server): Is the name of the SQL Server instance that hosts the BizTalk Management database on the local computer. By default this is usually the name of the local computer.
  • Redeploy (Redeploy): Boolean property that indicates if you want to allow redeployments from within Visual Studio. Setting this to “True” (the default) enables you to redeploy the BizTalk assemblies without changing the version number.
  • Install to Global Assembly Cache (Register): Setting this to “True” (the default) installs the assemblies to the Global Assembly Cache (GAC) on the local computer when you install the application. Set this to False only if you plan to use other tools for this installation, such as gacutil.
  • Restart Host Instances (RestartHostInstance): Setting this to “True” automatically restart all host instances running on the local computer when the assembly is redeployed. If set to False (the default), you must manually restart the host instances when you redeploy an assembly.

Let’s see an example of this file:

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="">
  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
      <FlavorProperties GUID="{EF7E3281-CD33-11D4-8326-00C04FA0CE8D}">
		<File Path="NormalizeAndRemoveUnnecessaryData\Client.xsd">

Secondly, you must keep in mind that these file (“*.btproj.user”) are typically not under source control. The reason is that the Visual Studio deployment feature main focus is for development scenarios where one user settings might differ from another. And it will be up to you, or your client, to decide if you want these files to be checked in and available to all of the developers on your team.

However when the team shares the same BizTalk developer environment, is expected that all build related information required at the time of build can be shared between developers in an easy way… unfortunately there is no easy way and one of the possible solutions is to force storing “*.btproj.user” files in the source control so that this setting can be shared by all the team members.

Although I know that the “*.btproj.user” Files are not supposed to be shared because they contain personal settings (as explained before) sometimes this approach can be considered a good practice.

Of course that this “workaround” can lead to additional problems, simple because this files contains some user settings, that can be different that yours (for example schema file properties only allows a valid full path file names) that can change your setting and probably don’t work in your developer station and need to be reconfigured, but this can be minimized with some precautions and good practices.

How can we check if “*.btproj.user” Files are stored in TFS and how to add them?
  • Open Visual Studio 2010 and select the “View” Menu and choose “Team Explorer” to connect to your TFS
  • Access to “Source Control” and from the source control tree you must browse to the project that you want.


  • Right click in the project folder and select “Add Items to Folder…” option


  • Select the BizTalk project folders present in the solution, and click “Next”


  • From this windows we can see that the “*.btproj.user” files are not include in the source code


  • To add them, you just need to select them and then click “Finish”.
Testing this workaround

After applying this wokaround, when I try to access and get the last version of the project with a different user, all the settings where correctly properly fulfilled:


And after a battery of tests that I performed very quickly with a member of my team, here are some suggestions to avoid some problems that sometimes happens and we face in our tests:

  1. Make a Label in the “*.btproj.user” file to properly and easily identify a clean BizTalk Application Deployment Settings with all important deployment settings and without any personal settings. This way you can, at any time, force to get that specific version of the file


  1. If you already have a local version of the project in your environment, you should get the last version and force to overwrite all the files by:
    1. Access to source code, in the project folder, right click and choose the option “Get Specific Version…”
    2. Check all the option in the Get Windows:
      1. Project folder
      2. “Overwrite writeable files that are not checked out” option
      3. “Overwrite all files even if the local version matches the specified version” option
      4. Choose the type “Latest Version” and click “Get”


In addition, once you have the correct settings, even if each individual users change locally their personal settings they are not committed to the source control by default, which means that it will not spoil the settings of other users every time someone does a check in. Again if you want to change this setting in the source control you need to force this to happen.

Final notes

Probably this is not the best approach for sharing the BizTalk Application Deployment Settings across all the team, but is a valid way and much better than each member manually add to their solution. I will try to find a better way and if you already have it, feel free to comment and share it here.


Once again I want to thank José António Silva, my ALM guru for the help! And thanks Bruno Zacarias for helping me testing this workaround.

Last week while making a simple BizTalk Server 2013 multi-computer environment (1 SQL Server and 1 BizTalk Server both running Windows Server 2012) configuration I faced several issues to properly configure BAM Portal, this was the first one was described in my previous blog post. This is the second one:

By solving the problem described in my previous post I was able to properly configure all the features in BizTalk Server: Enterprise SSO, Group, BizTalk Runtime, Business Rules Engine, BizTalk EDI/AS2 Runtime, BAM Tools and BAM Portal without any more problems, however we notice that the BAMAlerts service was logging several errors in the Event Viewer and was constantly stopping.


When we check the Event Viewer we were able to see the following messages:

Encountered error while executing command on SQL Server “server name”.
Event ID 0

Of course this was the generic message and doesn’t give us the real cause and doesn’t help us tracking the problem but we were able to get more details in the rest of the logs registered in the Event Viewer:

at Microsoft.BizTalk.Bam.AlertHost.Utility.GetProperty(String dbServer, String dbName, String propertyName, String scope)
at Microsoft.BizTalk.Bam.AlertHost.AlertHost.GetBAMMetadataProperties()
at Microsoft.BizTalk.Bam.AlertHost.AlertHost.Run()

Unhandled exception caught. Stoppping the service.

And finally:

Microsoft.BizTalk.Bam.Management.BamManagerException: Encountered error while executing command on SQL Server “servername”. —> System.Data.SqlClient.SqlException: The EXECUTE permission was denied on the object ‘bam_Metadata_GetProperty’, database ‘BAMPrimaryImport’, schema ‘dbo’.

at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteScalar()
at Microsoft.BizTalk.Bam.Management.SqlHelper.ExecuteScalar(String cmdText, CommandType cmdType)

When looking at the “bam_Metadata_GetProperty” stored procedure in the database “BAMPrimaryImport” database, we found that no role were defined:



These problems occurs because the BizTalk Server Configuration Tool didn’t properly configure the right permissions in this stored procedure.

As I described in my previous post, there are some known issue in the BizTalk Server 2013 release that was fixed in the Cumulative Update 1 specially this one regarding BAM Tools: KB article 2832137 – FIX: BAM tools cannot be configured in a multi-node BizTalk Server 2013 environment. I know is not exactly the same error, nevertheless, I think these problems are related to this configuration issue. So again I advise that before you try to configure BizTalk Server 2013 you should apply the CU’s available.


Again I advise that before you try to configure BizTalk Server 2013 you should apply the CU’s available.

However in my case to solve the problem I had to manually configure the correct permissions on this stored procedure, luckily I have other environments where I can check to see the correct permissions, so to solve this you need to:

  • Expand a server group, and then expand a server.
  • Expand “Databases”, expand the BAMPrimaryImport database, and then expand “Programmability”.
  • Expand “Stored Procedures”, right-click in the “bam_Metadata_GetProperty” procedure to grant permissions on, and then select “Properties” option.
  • From Stored Procedure Properties, select the “Permissions” page.
  • And to grant permissions to a user, database role, or application role you must click “Search” button.
    • In this case we need to give execution privileges to the database role “BAM_ManagementNSReader”


  • Click “OK”.

Alternative you can use the following SQL Query:

USE BAMPrimaryImport
GRANT EXECUTE ON OBJECT::bam_Metadata_GetProperty
    TO BAM_ManagementNSReader;

Last week while making a simple BizTalk Server 2013 multi-computer environment (1 SQL Server and 1 BizTalk Server both running Windows Server 2012) configuration I faced several issues to properly configure BAM Portal, this was the first one.

I was able to properly configure all the features: Enterprise SSO, Group, BizTalk Runtime, Business Rules Engine, BizTalk EDI/AS2 Runtime and even BAM Tools without any kind of problem, however every time I tried to configure BAM Portal I was getting the following error:

BAM Portal: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. (Configuration)


When checking the BizTalk Server Configuration log file, we were able to see something like the following message:

[datetime … Error Configuration Framework] Feature: [BAM Portal] Failed to configure with error message [<Exception Message=”Unexpected exception occurred while configuring [BAM Portal].” Source=”” HelpID=””><Exception Message=”Attempted to read or write protected memory. This is often an indication that other memory is corrupt.” Source=”Configuration” HelpID=”” /></Exception>]

However this is the generic message and doesn’t give us the real cause and doesn’t help us tracking the problem.

Suggestion: When this appends, don’t get stuck in that line, you should continue to read the log file because you will find useful and valid information’s!

In this case the real problem was:

[datetime … Error ConfigHelper] Cannot alter the role ‘NSSubscriberAdmin’, because it does not exist or you do not have permission.


The BizTalk Server Configuration Tool is trying to add the “BAM Management Web Service user” that was specify in the BAM Portal section into a database role called “NSSubscriberAdmin”, which doesn’t exist in the BAM Alert Application Database (BAMAlertsApplication) and for that reason it raises this exception.


There are some known issue in the BizTalk Server 2013 release that was fixed in the Cumulative Update 1 specially this one regarding BAM Tools: KB article 2832137 – FIX: BAM tools cannot be configured in a multi-node BizTalk Server 2013 environment. I know is not exactly the same error, nevertheless , I advise that before you try to configure BizTalk Server 2013 you should apply the CU’s available.

However in my case to solve the problem you must manually add “NSSubscriberAdmin” Database Role to BAM Alert Application Database (BAMAlertsApplication) by:

  • Expand a server group, and then expand a server.
  • Expand “Databases”, and then expand the BAMAlertsApplication database
  • Expand “Roles”. Right-click over “Roles” and select “New Database Role” option.


  • In the Name box, enter the following name: “NSSubscriberAdmin”.
  • Click “OK”.

Alternative you can use the following SQL Query:

USE BAMAlertsApplication

Fortunately I was able to find this problem in the BizTalk Server: List of Errors and Warnings, Causes, and Solutions TechNet Wiki article which led me to René Brauwers solution.

I always loved to read a lot and different types of magazines, about technology, cars or even National Geographic, sometimes just to pass the time flipping through their pages watching the photos, sometimes based on the title get deep and read the articles. I believe that is a good way to keep us updated on some topics.

However, besides the old BizTalk Hotrod Magazine, of my knowledge, there was no other type of magazine about BizTalk Server. I was a fan of this publication, but unfortunately the project is stopped and the last publication was in December 11, 2010. I really wish this project will have a new opportunity to come to life again.

I always had the idea of ​​creating some kind of electronic magazine or newspaper, but I always had a bit afraid the effort involved, and end up as BizTalk Hotrod. However all this changed after Flipboard release the ability to create personalized magazine for public, I think in March 2013, and I thought this could be an interesting platform and an easy way to finally create a new magazine dedicated to BizTalk Server.

I never published or talked about it on my blog, only on twitter, because this all started as a joke to pass the time while I was in the living room of the hospital visiting my father in law (he is now well at home, thankfully), but I’m already working in this “project” for about a year! And if my memory serves me correctly the first release was in May, 18 2013.


The good think about this is that I don’t need to create all the articles to put in the magazine, I can use my social networks like Facebook, Google+ or twitter and my blogs or RSS readers to create my magazine, Flipboard will take images, headlines and brief excerpt of this sources and automatically turns them into an attractive, magazine or journal style.

And also a very important thing is that, when we select any item it will opens up the full original post giving the right credit to the author. This is also a good way to promote the great contributors that exist in the BizTalk community.


This is intended to be a weekly magazine focus on BizTalk Server and Windows Azure BizTalk Services but it can also contain some general Integration articles. All the content present here are created by the BizTalk community members and Microsoft that can be found in personal blogs, TechNet Wiki, MSDN, Code Project, Code Gallery and so on.

The content of the magazine at the moment is maintained by me but this can change and I can invite other contributors to this project. I try to pick some of the best content provided the community and create this publication that with time can be a vast catalog or knowledge base about BizTalk Server.

You can find the BizTalkMagazine into Flipboard in in your favorite device Apple (iPhone, iPad), Android, Windows 8, and so on… or simply through the Internet browser at:

Have a nice read! And If you have any suggestions feel free to comment.

After two days ago we released version for BizTalk Server 2013, today is the time of BizTalk Mapper Extensions UtilityPack for BizTalk Server 2010 to be published and available for download!

This release will include all the new functionalities implemented by René Brauwers that were described in my last post: BizTalk Mapper Extensions UtilityPack for BizTalk Server 2013 Updated to v1.7.0.0

This means that we are still maintaining all the features available for BizTalk Server 2013 and 2010.

You can also find a shorter version of this project with less features for BizTalk Server 2009/2006 here: BizTalk Mapper Extensions UtilityPack for BizTalk Server 2006/2009

You can found and download Source Code, Application Binaries and Documentation in CodePlex BizTalk Mapper Extensions UtilityPack home page:

BizTalk Mapper Extensions UtilityPack


or from MSDN Code Gallery:

BizTalk Mapper Extensions UtilityPack for BizTalk Server 2010 (905.0 KB)
Microsoft | MSDN Code Gallery

Exciting news… Version of BizTalk Mapper Extensions UtilityPack for BizTalk Server 2013 is now available!

But before talking about the change-log of this version there is another subject that I want to talk first… This project as a new member that was responsible for all the new functionalities available in this version, my friend René Brauwers.

René is a senior Microsoft integration specialist at Motion10 with its head office in the Netherlands ( His career started in 2000 as a web developer/designer on the Microsoft platform. At the end of 2002 he got involved in the EAI/BPM world where he started of with WebMethods and did this for the next 3 years. In 2005 he changed his focus back to the Microsoft integration stack and as such got introduced to BizTalk Server 2004. Since 2005 he has been working with almost all versions of BizTalk Server and the last few years he has been specializing in Cloud integration with the Windows Azure platform and hybrid integration scenarios. René has his own blog on which he shares his BizTalk, .NET and Azure experiences.

Here’s the change-log for this release:

  • Two new functoids:
    • String Remove Leading Zeros Functoid
    • Get Windows Azure ACS Wrap Token Functoid
  • New deployment process using PowerShell script
  • New documentation
What’s new in this version?

Although BizTalk Server provides many functoids to support a range of diverse operations when working with strings or working/connecting with Windows Azure, we are limited to the number of existing operations. This new version will provide a new library that enables you to obtain an authentication token from the Windows Azure Access Control Service and new String operations.

This version will also provide a new simplify deployment process using PowerShell script.

Get Windows Azure ACS Wrap Token Functoid

This functoid allows you to obtain an ACS WRAP access token in order to access a Windows Azure BizTalk Services Bridge or Windows Azure Service Bus resources. Note this token needs to be added to the outbound request message Http Header. In order to do so use the Authorization key and assign it’s value as ‘WRAP access_token={RECEIVED TOKEN}’


The functoid takes four mandatory input parameters:

  • A string issuerName – Issuername belonging to the BizTalk Service namespace or Windows Azure Service Bus namespace
  • A string issuerKey – Issuerkey belonging to the BizTalk Service namespace or Windows Azure Service Bus namespace
  • A string endPoint – Full Uri pointing to the BizTalk Service Bridge or Windows Azure Service Bus queue/topic
  • A string windowsAzureACSNamespace – BizTalk Service or Service Bus ACS namespace name


Service Bus ACS namespace should be in format {namespace}-sb.
In case of doubt please log in to the Windows Azure Management Portal. Select Service Bus. Make a note of the name of the namespace to use and append –sb to it. You now have your ACS namespace (i.e. acme-sb)

BizTalk Services ACS namespace should be in format {namespace}{number}-bts
In case of doubt please log in to the Windows Azure Management Portal. Select BizTalk Services. Select the correct BizTalk Service and select Connection Information. A window will pop up containing the namespace (i.e. acme123-bts)

The output of the functoid is a string, Example:

The output should then be added to the Authorization http header of the outbound message. Example: [“Authorization”] = String.Format(“WRAP access_token=\”{0}\””, <YOUR TOKEN>);


String Remove Leading Zeros Functoid

This functoid allows you to remove any leading zeros from an input string.


The functoid has one mandatory parameter:

  • Input string which contains leading zeros which need to be removed.

The output of the functoid is an integer which is equal to the input instance but than with the leading zeros removed.


You can found and download Source Code, Application Binaries and Documentation in CodePlex BizTalk Mapper Extensions UtilityPack home page:

BizTalk Mapper Extensions UtilityPack


or from MSDN Code Gallery:

BizTalk Mapper Extensions UtilityPack for BizTalk Server 2013 (628.8 KB)
Microsoft | MSDN Code Gallery