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

  • Sandro Pereira
  • Oct 7, 2020
  • 3 min read

In my infamous crusade to document any BizTalk Server error that I have already come across, here is another errors, warnings, causes, and solutions blog post, this time joining another one of my favorite topics: 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

📝 One-Minute Brief

Explains how to troubleshoot the BizTalk deployment error “Error saving map. Stored procedure returned non‑zero result”, which occurs when maps reference schemas from external assemblies that are not yet deployed.

Cause

In earlier versions of BizTalk Server, mainly 2009 and 2010, Microsoft reported a known bug related to this issue. BizTalk attempted to deploy the mapper assembly before the schema assembly, which caused the deployment to fail.

In those cases, installing Cumulative Update 4 (or later) for BizTalk Server 2010 resolved the problem.

However, I was working with BizTalk Server 2016, so this explanation did not apply. Fortunately, the error message clearly indicated where the failure occurred by referencing the FULLY‑QUALIFIED‑MAP‑NAME.

To investigate further, I opened the solution in my development environment and reviewed the affected map. At that point, I focused on identifying the schemas used by that map.

During this analysis, I discovered that one of the schemas came from an external assembly. This shared schema served multiple applications.

That dependency caused the error. The map referenced a schema from an external DLL that was not yet deployed in the target environment.

Solution

Make sure to deploy all the reference assemblies, especially the ones outside your Visual Studio solution, 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 them 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.

Hope you find this helpful! If you liked the content or found it useful and would like to support me in writing more, consider buying (or helping to buy) a Star Wars Lego set for my son. 

Thanks for Buying me a coffe
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 *

The Ultimate Cloud
Management Platform for Azure

Supercharge your Azure Cost Saving

Learn More
Turbo360 Widget

Back to Top