BizTalk Solution Deploy Error: Error saving map. Stored procedure returned non-zero result.

In my infamous crusade to document any BizTalk Server error that I have already come across, here is another error, warnings, cause, and solutions blog post, this time joining another of my favorite topic: Maps.

While trying to deploy a BizTalk Server solution – MSI – into production. While trying to import the BizTalk Application from the .msi file into the BizTalk group by using the BizTalk Server Administration Console by:

  1. Opening the BizTalk Server Administration Console for the instance of BizTalk Server into which you want to import the application. Click Start, click All Programs, click Microsoft BizTalk Server 20xx, and then click BizTalk Server Administration.
  2. In the console tree, expand BizTalk Server Administration, and then expand BizTalk Group.
  3. Right-click Applications, point to Import and then click MSI file.

I came across this error during the progress phase:

Failed to add resource(s). (mscorlib)
– Change requests failed for some resources. (Microsoft.BizTalk.ApplicationDeployment.Engine)
– BizTalkAssemblyResourceManager failed to complete end type change request. (Microsoft.BizTalk.ResourceManagers)
Failed to deploy map “FULLY-QUALIFIED-MAP-NAME”. Error saving map. Stored procedure returned non-zero result. Check if source and target schemas are present. (mscorlib)
Error saving map. Stored procedure returned non-zero result. Check if source and target schemas are present. (Microsoft.BizTalk.Deployment)

Error saving map. Stored procedure returned non-zero result

Cause

In previous versions of BizTalk Server, mainly 2010 and 2009, a bug was reported related to this issue. That problem occurred because BizTalk was trying to deploy the mapper assembly before the schema assembly. The solution for that case was installing the cumulative update 4 (or above) for BizTalk Server 2010 or the cumulative update 7 for BizTalk Server 2010.

Nevertheless, I was using BizTalk Server 2016, so that wasn’t the case. Luckily for us, the error provides a piece of clear evidence where the error is happening: FULLY-QUALIFIED-MAP-NAME.

To understand this issue, I went to my dev environment and opened that solution to analyze that specific map, mainly to know which schemas were being used. I then realize that one of the schemas was from an external assembly, a common schema that could be used by several applications.

The cause of this error was precisely that. I used a reference schema (external DLL) inside my map outside the project I was trying to deploy. But that assembly – DLL containing the map’s schema – was not yet deployed in the environment.

Solution

Make sure to deploy all the reference assemblies, special the ones outside your visual studio solution, are deployed before you deploy your solution. And in this case, make sure that all schemas are deployed before installing the maps.

But once again, the critical point here is to make sure to deploy all schemas outside your solution that are being used. Because, even if we use specific projects for maps and schemas inside our solution, BizTalk Server is smart enough to see the dependencies and deploy it accordingly.

After installing the external assembly that contains the schema used by that map, I was able to deploy the BizTalk project into production successfully.

Author: Sandro Pereira

Sandro Pereira lives in Portugal and works as a consultant at DevScope. In the past years, he has been working on implementing Integration scenarios both on-premises and cloud for various clients, each with different scenarios from a technical point of view, size, and criticality, using Microsoft Azure, Microsoft BizTalk Server and different technologies like AS2, EDI, RosettaNet, SAP, TIBCO etc. He is a regular blogger, international speaker, and technical reviewer of several BizTalk books all focused on Integration. He is also the author of the book “BizTalk Mapping Patterns & Best Practices”. He has been awarded MVP since 2011 for his contributions to the integration community.

Leave a Reply

Your email address will not be published. Required fields are marked *

BizTalk360
BizTalk Server

Over 500+ customers across
30+ countries depend on BizTalk360

Learn More
Serverless360
Azure

Manage and monitor serverless
components effortlessly

Learn More
Atomicscope
Business Users

Monitor your Business Activity in iPaaS
or Hybrid integration solutions

Learn More

Back to Top