BizTalk MessageType: case-sensitive or case-insensitive?

This post was originally published here.

This blog post is all about how schemas are resolved by the BizTalk XML Disassembler. Does BizTalk treats the MessageType in a case-sensitive or a case-insensitive way? Let’s have a look!

As you all know, the BizTalk XML Disassembler checks – by default – if a schema is deployed that matches the incoming message.  BizTalk does this via the BTS.MessageType, which is a combination of TargetNamespace#RootNode.  This BTS.MessageType must be unique in your BizTalk Group.  If two schemas are deployed with the same TargetNamespace#RootNode, the XML Disassembler will throw this error message:

“Cannot locate document specification because multiple schemas matched the message type”

Lately we had an issue, related to this subject.  We had two schemas deployed, that varied only by case.  Below, you find a similar example.


Now the question is: will BizTalk treat these schemas as identical schemas or not? My first guess was that BizTalk would treat these schemas as unique because it’s related to XML, which is case-sensitive.  However, when processing one of the two messages, the XML Disassembler threw an error because multiple schemas matched the message type.

I investigated how BizTalk resolved the schema, so I turned on SQL Server Profiler.  There, I discovered this entry:

exec bt_GetDocSpecInfoByMsgType 

The most important query of the GetDocSpecInfoByMsgType stored procedure is this one:


Because my SQL Server Collation, Latin1_General_CI_AS, is case-insensitive, the query results into 2 matched schemas, so the XML Disassembler will throw an exception.

After some searching on MSDN I’ve found this remark:

“If you will be using two namespaces that vary only by case, the BizTalk database must be installed with a case-sensitive collation. Examples of case-sensitive collations include binary and non-binary collations with case-sensitivity enabled. If this is not done, schema resolution will fail because XML is case-sensitive.”


Is the BTS.MessageType case-sensitive or case-insensitive?
It depends on your SQL Server Collation.



Your Azure Coach is specialized in organizing Azure trainings that are infused with real-life experience. All our coaches are active consultants, who are very passionate and who love to share their Azure expertise with you.