<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-US"><title type="html">Atin Agarwal's Blog</title><subtitle type="html">From the desk of a BizTalk Support Professional</subtitle><id>http://blogs.msdn.com/atinag/atom.xml</id><link rel="alternate" type="text/html" href="http://blogs.msdn.com/atinag/default.aspx" /><link rel="self" type="application/atom+xml" href="http://blogs.msdn.com/atinag/atom.xml" /><generator uri="http://communityserver.org" version="2.1.61025.2">Community Server</generator><updated>2008-07-24T08:27:00Z</updated><entry><title>Biztalk and .NET 4.0</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/atinag/archive/2009/10/28/biztalk-and-net-4-0.aspx" /><id>http://blogs.msdn.com/atinag/archive/2009/10/28/biztalk-and-net-4-0.aspx</id><published>2009-10-28T19:51:48Z</published><updated>2009-10-28T19:51:48Z</updated><content type="html">&lt;p&gt;Just wanted to point you all to &lt;a title="http://blogs.msdn.com/biztalkcrt/archive/2009/10/28/biztalk-and-net-4-0.aspx" href="http://blogs.msdn.com/biztalkcrt/archive/2009/10/28/biztalk-and-net-4-0.aspx"&gt;http://blogs.msdn.com/biztalkcrt/archive/2009/10/28/biztalk-and-net-4-0.aspx&lt;/a&gt;, which says not to install .NET 4.0 on existing Biztalk installations. This is still being investigated.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9914286" width="1" height="1"&gt;</content><author><name>Atin Agarwal</name><uri>http://blogs.msdn.com/members/Atin+Agarwal.aspx</uri></author></entry><entry><title>Inserting parent child records with Identity column using WCF-SQL Adapter in one transaction</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/atinag/archive/2009/10/05/inserting-parent-child-records-with-identity-column-using-wcf-sql-adapter-in-one-transaction.aspx" /><id>http://blogs.msdn.com/atinag/archive/2009/10/05/inserting-parent-child-records-with-identity-column-using-wcf-sql-adapter-in-one-transaction.aspx</id><published>2009-10-05T20:47:19Z</published><updated>2009-10-05T20:47:19Z</updated><content type="html">&lt;p&gt;There would be scenarios where you are inserting into a Parent table which have got an auto incrementing or an Identity field and you need to get this identity value back and use it to insert into child table records. And that too all, in a single transaction.&lt;/p&gt;  &lt;p&gt;In Native SQL Adapter, this kind of composite operation can be achieved using updategram by capturing the value generated for the Identity field using the updg:at-identity attribute. This is documented at whitepaper: &lt;a href="http://msdn.microsoft.com/en-us/library/ms935658(BTS.10).aspx" target="_blank"&gt;Working With BizTalk Adapter for SQL Server&lt;/a&gt;. But when it comes to WCF-SQL Adapter (Adapter Pack 2.0), since it would not work with updategram, only way I could figure out is to write a Stored Procedure which will do all the stuff in a single transaction and you can then call it from the Send Port. Of course, you can do the same in multiple operations without calling Stored Procedure where you first write to Parent table and get the identity value back as response and then write to child table; but this would not be a single transaction and any failures will writing to child table will not rollback the insertion into Parent table by itself.&lt;/p&gt;  &lt;p&gt;Now, when it comes to writing Stored Procedure, if you just need to insert into one parent record and one child record, it would be simpler. But what about if there are multiple child records for a single parent record? For this, we would need to create an Xml message and pass this to the Stored Procedure as an Xml parameter. And then inside the stored procedure, we need to retrieve the values from the Xml message and insert it to our Parent and Child tables. Parsing the Xml message inside Procedure will be not an easy task if the message schema is complicated (especially for EDI Schemas :) ) and will involve good knowledge of writing Xpath Queries. But this becomes really simpler with use of Table Types and Table-Valued Parameters in SQL 2008. (Thanks to Mustansir Doctor for pointing me to this new feature of SQL 2008)&lt;/p&gt;  &lt;p&gt;Here is an example of how we can achieve the same using Table Types and Table-Valued Parameters.&lt;/p&gt;  &lt;p&gt;Lets say we have two tables Orders &amp;amp; Order Details in SQL 2008 with Primary Foreign relationship&amp;#160; and OrderId is an auto incrementing field.&lt;/p&gt;  &lt;p&gt;&amp;#160; &lt;a href="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/a16ba1b3000b_45F4/Untitled_2.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Untitled" border="0" alt="Untitled" src="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/a16ba1b3000b_45F4/Untitled_thumb.jpg" width="404" height="148" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Now, first step will be to create Table Types for the above two tables:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;a href="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/a16ba1b3000b_45F4/image_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/a16ba1b3000b_45F4/image_thumb.png" width="430" height="202" /&gt;&lt;/a&gt;&amp;#160; &lt;/p&gt;  &lt;p&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 10pt"&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 10pt"&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 10pt"&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 10pt"&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 10pt"&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 10pt"&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 10pt"&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 10pt"&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 10pt"&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 10pt"&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 10pt"&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 10pt"&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 10pt"&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 10pt"&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;We do not need to have OrderId field in the Table Type created as this is an incrementing field and we do not need to pass this in parameters passed to Stored Procedure.&lt;/p&gt;  &lt;p&gt;Now, create a stored procedure to which we will pass this Table Type as parameter and inside it we will first insert into Orders table and read out the Identity value and use it to insert into OrderDetails table. Also, notice that reading out values from the Table Type objects is as simple as reading out form a Table.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/a16ba1b3000b_45F4/Untitled_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Untitled" border="0" alt="Untitled" src="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/a16ba1b3000b_45F4/Untitled_thumb_2.png" width="541" height="484" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Now, what all we have to do is to use Consume Adapter Service through Visual Studio to generate Schema.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;a href="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/a16ba1b3000b_45F4/Untitled2_2.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Untitled2" border="0" alt="Untitled2" src="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/a16ba1b3000b_45F4/Untitled2_thumb.jpg" width="679" height="607" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;It will generate two schemas TableType.dbo.xsd and TypedProcedure.dbo.xsd along with a binding file for the WCF-SQL Adapter.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;TableType.dbo.xsd&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;a href="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/a16ba1b3000b_45F4/Untitled3_2.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Untitled3" border="0" alt="Untitled3" src="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/a16ba1b3000b_45F4/Untitled3_thumb.jpg" width="218" height="294" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;strong&gt;TypedProcedure.dbo.xsd&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160; &lt;a href="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/a16ba1b3000b_45F4/Untitled4_2.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Untitled4" border="0" alt="Untitled4" src="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/a16ba1b3000b_45F4/Untitled4_thumb.jpg" width="243" height="226" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;TypedProcedure.dbo.xsd contains the request and response schema for WCF-SQL Adapter. &lt;/p&gt;  &lt;p&gt;Now, only thing remaining is to construct a message of the request schema type inside the Orchestration and send it to WCF-SQL Adapter which will execute the Stored Procedure. I am not going into it more detail on how we do it inside Orchestration as it will be similar to any other operation we do using WCF-SQL Adapter.&lt;/p&gt;  &lt;p&gt;You can see that using the Table Types simplify the things to a large extent and we do not need to write a single line of code to parse the XML.&lt;/p&gt;  &lt;p&gt;I hope it helps.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9903354" width="1" height="1"&gt;</content><author><name>Atin Agarwal</name><uri>http://blogs.msdn.com/members/Atin+Agarwal.aspx</uri></author><category term="WCF-SQL" scheme="http://blogs.msdn.com/atinag/archive/tags/WCF-SQL/default.aspx" /><category term="BAP 2.0" scheme="http://blogs.msdn.com/atinag/archive/tags/BAP+2.0/default.aspx" /></entry><entry><title>Messages for MQSeries Adapter failing due to DTC failure</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/atinag/archive/2009/09/08/messages-for-mqseries-adapter-failing-due-to-dtc-failure.aspx" /><id>http://blogs.msdn.com/atinag/archive/2009/09/08/messages-for-mqseries-adapter-failing-due-to-dtc-failure.aspx</id><published>2009-09-09T01:57:48Z</published><updated>2009-09-09T01:57:48Z</updated><content type="html">&lt;p&gt;If you are trying to send or receive message to MQ Server using the MQSeries Adapter, and receiving following errors in the application event log:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;on BizTalk Server&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Event ID: 5740    &lt;br /&gt;Description:     &lt;br /&gt;The adapter &amp;quot;MQSeries&amp;quot; raised an error message. Details &amp;quot;Error encountered on opening Queue Manager name = &amp;lt;queue manager&amp;gt;&amp;#160; Reason code = 2354.&amp;quot;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;on MQ Server&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Event Source: Microsoft BizTalk Server 2006 Adapter for MQSeries    &lt;br /&gt;Event Category: Devices     &lt;br /&gt;Event ID: 264     &lt;br /&gt;Description:     &lt;br /&gt;Error encountered as BizTalk attempts to retrive a message from MQSeries, description = Error encountered on opening Queue Manager name = &amp;lt;queue manager&amp;gt; Reason code = 2354. hresult = &lt;strong&gt;0XC0C11007&lt;/strong&gt;. This error will also be reported on the BizTalk server.&lt;/p&gt;  &lt;p&gt;Most probably, this issue arises due to lack of DTC connectivity between the BizTalk and MQ Server. &lt;/p&gt;  &lt;p&gt;To resolve it, we have to make sure the DTC communication between two computers is fine. Make sure that the MSDTC security settings on both BizTalk as well as MQ Server looks like in the below screen shot.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/MessagesforMQSeriesAdapterfailingduetoDT_3EBE/Untitled_2.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Untitled" border="0" alt="Untitled" src="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/MessagesforMQSeriesAdapterfailingduetoDT_3EBE/Untitled_thumb.jpg" width="436" height="426" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;Also, DTC communication can usually fail if the name resolution or RPC communication between two computers is failing. To test it, we can use a small but useful tool named as DTCPing. &lt;/p&gt;  &lt;p&gt;DTCPing Download: &lt;a title="http://www.microsoft.com/downloads/details.aspx?FamilyID=5e325025-4dcd-4658-a549-1d549ac17644&amp;amp;DisplayLang=en" href="http://www.microsoft.com/downloads/details.aspx?FamilyID=5e325025-4dcd-4658-a549-1d549ac17644&amp;amp;DisplayLang=en"&gt;http://www.microsoft.com/downloads/details.aspx?FamilyID=5e325025-4dcd-4658-a549-1d549ac17644&amp;amp;DisplayLang=en&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Troubleshooting MSDTC issues with the DTCPing tool: &lt;a title="http://blogs.msdn.com/distributedservices/archive/2008/11/12/troubleshooting-msdtc-issues-with-the-dtcping-tool.aspx" href="http://blogs.msdn.com/distributedservices/archive/2008/11/12/troubleshooting-msdtc-issues-with-the-dtcping-tool.aspx"&gt;http://blogs.msdn.com/distributedservices/archive/2008/11/12/troubleshooting-msdtc-issues-with-the-dtcping-tool.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;I hope it helps!&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9892863" width="1" height="1"&gt;</content><author><name>Atin Agarwal</name><uri>http://blogs.msdn.com/members/Atin+Agarwal.aspx</uri></author><category term="DTC" scheme="http://blogs.msdn.com/atinag/archive/tags/DTC/default.aspx" /><category term="MQSeries" scheme="http://blogs.msdn.com/atinag/archive/tags/MQSeries/default.aspx" /></entry><entry><title>Error due to missing HIPPA Schema Trigger Field Annotations</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/atinag/archive/2009/07/30/error-due-to-missing-hippa-schema-trigger-field-annotations.aspx" /><id>http://blogs.msdn.com/atinag/archive/2009/07/30/error-due-to-missing-hippa-schema-trigger-field-annotations.aspx</id><published>2009-07-31T02:45:17Z</published><updated>2009-07-31T02:45:17Z</updated><content type="html">&lt;p&gt;Recently, I was working on a support incident where the customer have modified 837I HIPPA schema by adding a child node under DTP segment. But, while we tried to validate an instance against the schema at both design time and run time, we will get error “Object reference not set to an instance of an object”.&lt;/p&gt;  &lt;p&gt;Below is the error thrown by EDIReceive pipeline at run time.&lt;/p&gt;  &lt;p&gt;Event Type: Error    &lt;br /&gt;Event Source: BizTalk Server 2009 EDI     &lt;br /&gt;Event Category: None     &lt;br /&gt;Event ID: 4097     &lt;br /&gt;Description:     &lt;br /&gt;Fatal error encountered in EDI Disassembler, error information is Object reference not set to an instance of an object.&lt;/p&gt;  &lt;p&gt;The issue would not happen if we were using the default 837I HIPPA schema which comes out of the box with BizTalk. Now, it means that something going wrong with the node which we have added to schema and the error is also of not much help here. Also, if we remove the data from the input instance corresponding to the node added in the schema, it would get successfully parse.&amp;#160;&amp;#160; &lt;/p&gt;  &lt;p&gt;After we did a thorough examination of schema (all thanks to Farida for this), we found that the child node added under DTP segment in the schema was missing the HIPPA Schema Trigger Field Annotations. First learn what are HIPPA Schema Trigger Field Annotations, for that click &lt;a href="http://msdn.microsoft.com/en-us/library/dd792702(BTS.10).aspx" target="_blank"&gt;here&lt;/a&gt;. Here it was happening that, for DTP segment, we had other default child nodes which have got their Trigger Field Annotations specifying what their qualifier values (or trigger values) are. Now when the EDI Disassembler encounters DTP segment followed by the qualifier value, it should be able to resolve it to the corresponding XML child node under DTP segment. But when it encountered DTP segment for the child node added to the schema, it was not able to resolve the qualifier value to any node since there is no child node matching that qualifier value and hence the error. &lt;/p&gt;  &lt;p&gt;Once we added the Trigger Field Annotations to the node added manually, it resolved the error. Note that, for adding the trigger info, we have to open the schema in a text editor.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/ErrorduetomissingHIPPASchemaTriggerField_37EA/image_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/ErrorduetomissingHIPPASchemaTriggerField_37EA/image_thumb.png" width="879" height="320" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9853865" width="1" height="1"&gt;</content><author><name>Atin Agarwal</name><uri>http://blogs.msdn.com/members/Atin+Agarwal.aspx</uri></author></entry><entry><title>Call orchestration with ref parameter in a loop</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/atinag/archive/2009/06/18/call-orchestration-with-ref-parameter-in-a-loop.aspx" /><id>http://blogs.msdn.com/atinag/archive/2009/06/18/call-orchestration-with-ref-parameter-in-a-loop.aspx</id><published>2009-06-19T00:28:31Z</published><updated>2009-06-19T00:28:31Z</updated><content type="html">&lt;p&gt;Sometime back I worked on a case where the spool would go very high and I have been thinking to blog this for some time now and today I decided I will process this awaiting queued item in my mind.&lt;/p&gt;  &lt;p&gt;I had a customer who was seeing a surge in the spool count whenever an orchestration instance started and spool would go back to its original count only once this instance get completed. As we all know, the high count of spool impact Biztalk processing, the customer was too worried about it.&lt;/p&gt;  &lt;p&gt;Looking into the orchestration, they have got a loop shape which could loop up to 40K times or even more. In this loop, they were calling an orchestration with Biztalk message being passed as ref parameter.&lt;/p&gt;  &lt;p&gt;We found that with REF we need to keep messages around until the orchestration completes, so that is why the spool count keeps growing till the loop completes and once the orchestration instance completes, Biztalk jobs would clean up messages from spool. This is by design.&lt;/p&gt;  &lt;p&gt;To demonstrate this, we got a simple orchestration with a loop inside. This will loop for 50 times only.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/Callorchestrationwithrefparameterinaloop_F45/image_10.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/Callorchestrationwithrefparameterinaloop_F45/image_thumb_4.png" width="282" height="353" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Inside the loop, we are making a call to another orchestration and passing Biztalk messages as REF parameter.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/Callorchestrationwithrefparameterinaloop_F45/image_6.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/Callorchestrationwithrefparameterinaloop_F45/image_thumb_2.png" width="462" height="355" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;If we test it, and monitor the spool count in perfmon, we will see that spool keeps growing until the loop completes and once the orchestration instance completes, Biztalk jobs are quick to clear the spool. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/Callorchestrationwithrefparameterinaloop_F45/image_8.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/Callorchestrationwithrefparameterinaloop_F45/image_thumb_3.png" width="594" height="364" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;As a workaround for REF parameter, if we pass a message as IN parameter and have one more OUT parameter of the same type in the called orchestration to return the result, I see that spool growth is lower than while using REF parameter, but still for very large loops spool count can grow substantially. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/Callorchestrationwithrefparameterinaloop_F45/image_12.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/Callorchestrationwithrefparameterinaloop_F45/image_thumb_5.png" width="594" height="364" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Also, if possible we can try using variables instead - which can be reused as opposed to message. &lt;/p&gt;  &lt;p&gt;So moral of the story is we have to avoid large loops with call orchestration shape passing ref parameter. We would suggest using smaller loop, or removing the call structure by using expression Shape or custom object etc. &lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9777566" width="1" height="1"&gt;</content><author><name>Atin Agarwal</name><uri>http://blogs.msdn.com/members/Atin+Agarwal.aspx</uri></author><category term="Orchestration" scheme="http://blogs.msdn.com/atinag/archive/tags/Orchestration/default.aspx" /></entry><entry><title>BAM tracking data gone missing</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/atinag/archive/2009/04/14/bam-tracking-data-gone-missing.aspx" /><id>http://blogs.msdn.com/atinag/archive/2009/04/14/bam-tracking-data-gone-missing.aspx</id><published>2009-04-15T00:56:20Z</published><updated>2009-04-15T00:56:20Z</updated><content type="html">&lt;p&gt;Recently, I worked on a BAM issue and I wanted to share with you all some interesting facts which I found while researching on this.&lt;/p&gt;  &lt;p&gt;Customer implemented BAM Activities with Event Streams. They were using OrchestrationEventStreams within Orchestrations. &lt;/p&gt;  &lt;p&gt;This is how their flow looks like in short: &lt;/p&gt;  &lt;p&gt;Orch1:&amp;#160; Start Orch1 –&amp;gt; BeginActivity –&amp;gt; UpdateActivity –&amp;gt; Enable Continuation –&amp;gt; Send message to Orch2 so that it gets instantiated and passing Continuation Token to it --&amp;gt; End Activity    &lt;br /&gt;Orch2:&amp;#160; Start Orch2 --&amp;gt; Update Activity with Continuation Token&amp;#160; --&amp;gt; End Activity with Continuation Token &lt;/p&gt;  &lt;p&gt;Customer observed that sometimes there is a row in the BAM Active table with ActivityId set to ContinuationToken and IsVisible set to NULL. This tracked BAM data is sitting idle in the active table and would not go to Completed table. Also, since the IsVisible is set to NULL, it would mean that it is not going to be shown through BAM view or BAM Portal, unless you write a custom query. &lt;/p&gt;  &lt;p&gt;Researching on this, I found that if IsVisible is NULL, this would mean that BeginActivity was never called. So, what was happening in the customer case that that BAM events from Orch2 were getting processed and reaching BAMPrimaryImportDB while the BAM events from Orch1 never make up or they got stuck somewhere in between. Now, the question was how come the events from Orch1 were not getting processed though the events from Orch2, which got instantiated after Orch1, were getting processed. Also, keeping in mind, that the issue is intermittent. &lt;/p&gt;  &lt;p&gt;Lets now understand how do the OrchesetrationEventStream(OES) API works. OES API’s are asynchronous. This means that API stores tracking data first in the BizTalk MessageBox database. Periodically the data is processed and persisted to the BAMPrimaryImport database by the Tracking Data Decode Service (TDDS).&amp;#160; There are four tables inside the MessageBox database which stores BAM Tracking data before it gets moved to BAMPrimaryImportDB i.e trackingdata_0_0, trackingdata_0_1, trackingdata_0_2, trackingdata_0_3 (note: the other four tables trackingdata_1_x store the tracking data for BiztalkDTADB). For a particular Orchestration instance, OES uses the Orchestration ID as the StreamID and all the events are written to the same table by the OES and TDDS can guarantee that the events are processed in the same order. &lt;a title="http://msdn.microsoft.com/en-us/library/microsoft.biztalk.bam.eventobservation.bufferedeventstream.streamid.aspx" href="http://msdn.microsoft.com/en-us/library/microsoft.biztalk.bam.eventobservation.bufferedeventstream.streamid.aspx"&gt;http://msdn.microsoft.com/en-us/library/microsoft.biztalk.bam.eventobservation.bufferedeventstream.streamid.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;But since we have two different Orchestrations here, it would mean that all the BAM tracking data could go to different Tracking tables inside MsgBox and then we cannot guarantee that it would be processed in sequence. But since we are using Continuations, BAM guarantee that the end result after all the events gets processed (no matter what the sequence is), we should see correct result in the BAM Completed table. That’s the magic with BAM.&lt;/p&gt;  &lt;p&gt;Now we queried on the four trackingdata tables inside MsgBox DB and found that the table trackingdata_0_0 has more than 50000 rows which keeps moving in the upward fashion and never decreased. It seems that somehow BAM data stored at this table is stuck there and TDDS is not able to move it to BAMPrimaryImport DB. It now clearly makes sense why we sometimes see BAM events from Orch2 inside BAMPrimaryImport DB and not from Orch1 as the events from Orch2 might have been stored at table other than trackingdata_0_0 and got successfully processed by TDDS. It also explains the intermittent nature of problem as other times the BAM events from Orch1 and Orch2 got written to table other than trackingdata_0_0. Also, sometimes both the events from Orch1 and Orch2 could get written to trackingdata_0_0 table and we would see no BAM data getting tracking in BAMPrimaryImport.&lt;/p&gt;  &lt;p&gt;Later, on more digging, the issue was found external to Biztalk. The issue was all related to network and firewall between the Biztalk and SQL servers. After those issues were fixed, all data from trackingtable_0_0 table moved to the BAMPrimaryImportDB correctly.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9549501" width="1" height="1"&gt;</content><author><name>Atin Agarwal</name><uri>http://blogs.msdn.com/members/Atin+Agarwal.aspx</uri></author><category term="BAM" scheme="http://blogs.msdn.com/atinag/archive/tags/BAM/default.aspx" /></entry><entry><title>Message for the File Send Adapter remains in active state</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/atinag/archive/2009/04/02/message-for-the-file-send-adapter-remains-in-active-state.aspx" /><id>http://blogs.msdn.com/atinag/archive/2009/04/02/message-for-the-file-send-adapter-remains-in-active-state.aspx</id><published>2009-04-02T13:15:00Z</published><updated>2009-04-02T13:15:00Z</updated><content type="html">&lt;P&gt;This was an interesting issue on which I worked with Shaheer (Biztalk Escalation Engineer) for 2 customers, so I thought I would share it with all.&lt;/P&gt;
&lt;P&gt;Customer is using File Adapter at Send Port to write files to a file server. Sometimes, the send message stuck inside in Biztalk with active status and a 0 Kb file is created on the share on the file server. The message remains in active state until we restart the host instance, and then the message is written to the file share. &lt;/P&gt;
&lt;P&gt;We took the Biztalk traces and although we did not see anything for the send port other than them being stuck, at the same time that the send ports were stuck, we could see the receive locations hitting the same file server were throwing error 0x800703E5 and Win32 Error = 56 in the traces and even sometimes 80070038 &lt;/P&gt;
&lt;P&gt;[filelistener]Network connection to location (\\&amp;lt;fileshare&amp;gt;) is down. Error = 80070038 &lt;/P&gt;
&lt;P&gt;--- 0x80070038 means: &lt;BR&gt;ERROR_TOO_MANY_CMDS winerror.h &lt;BR&gt;# The network BIOS command limit has been reached. &lt;/P&gt;
&lt;P&gt;--- 0x800703E5 means: &lt;BR&gt;ERROR_IO_PENDING winerror.h &lt;BR&gt;Overlapped I/O operation is in progress. &lt;/P&gt;
&lt;P&gt;--- Win32 Error = 56 means: &lt;BR&gt;Network Bios Command limit has been reached. &lt;/P&gt;
&lt;P&gt;This means the network bios command limit has been reached between the Biztalk Sever and the file server. This can happen when there is a very high load of SMB traffic between Windows servers since the default network bios command limit may not be high enough to handle this load. This will effect any SMB traffic between BTS &amp;amp; that file server so even though the error in trace was happening for receive location, it would apply to send port hitting same file server also. &lt;/P&gt;
&lt;P&gt;Now comes the resolution part:&lt;/P&gt;
&lt;P&gt;Need to follow the below steps as per &lt;A href="http://support.microsoft.com/kb/810886" target=_blank mce_href="http://support.microsoft.com/kb/810886"&gt;KB 810886&lt;/A&gt; to increase command limit by setting BOTH of the following registry keys on all the Biztalk Servers AND the File server AND any other file server that you may have problems with: &lt;BR&gt;1. Click Start, click Run, type regedit, and then click OK. &lt;BR&gt;2. Locate and then click the following key in the registry: &lt;BR&gt;HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanworkstation\parameters &lt;BR&gt;3. In the right pane, double-click the MaxCmds value and in the Value data box change the value to decimal 5000. (If the MaxCmds value does not exist, create it as a new REG_DWORD value of decimal 5000) &lt;BR&gt;4. Locate and then click the following key in the registry: &lt;BR&gt;HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters &lt;BR&gt;5. In the right-pane, double-click the MaxMpxCt value and in the Value data box change the value to decimal 5000. (If the MaxMpxCt value does not exist, create it as a new REG_DWORD value of decimal 5000) &lt;BR&gt;6. Quit Registry Editor. &lt;BR&gt;7. Reboot the computer &lt;/P&gt;
&lt;P&gt;We have said above value 5000, taking less cautious route to start with a high value and work your way down. If we want to be cautious, we can start by increasing it to 1000 and then see if we still have the problem and if so, increase it again. In a very high load environment, even 5000 may not be enough and the value would have to be increased further. Only thing we could think with high value even as high as 50,000 is that we may run into high cpu on file server if it can't handle the load. &lt;/P&gt;
&lt;P&gt;[Note: The maximum number of simultaneous, active requests between an SMB client and the server is determined when a client/server session is negotiated. The maximum number of requests that a client supports is determined by the MaxCmds registry value. The maximum number of requests that a server supports is determined by the MaxMpxCt registry value. For a particular client and server pair, the number of simultaneous, active requests is the lesser of these two values. This is documented at &lt;A href="http://support.microsoft.com/kb/810886" target=_blank mce_href="http://support.microsoft.com/kb/810886"&gt;KB 810886&lt;/A&gt;.]&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9528150" width="1" height="1"&gt;</content><author><name>Atin Agarwal</name><uri>http://blogs.msdn.com/members/Atin+Agarwal.aspx</uri></author><category term="Biztalk" scheme="http://blogs.msdn.com/atinag/archive/tags/Biztalk/default.aspx" /></entry><entry><title>EDI pipeline with character set Extended</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/atinag/archive/2009/03/19/edi-pipeline-with-character-set-extended.aspx" /><id>http://blogs.msdn.com/atinag/archive/2009/03/19/edi-pipeline-with-character-set-extended.aspx</id><published>2009-03-19T02:36:56Z</published><updated>2009-03-19T02:36:56Z</updated><content type="html">&lt;p&gt;Receiving German Characters in the EDI message received by Biztalk 2006 R2. We have set the character set to &amp;quot;Extended&amp;quot; in the receive pipeline but it still fails in the receive pipeline.    &lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Solution:&lt;/strong&gt; &lt;/p&gt;  &lt;p&gt;Found that the char set ‘Extended’ does not include the complete iso8859-1. It implements subset of the 8859-1 . The following is the list of characters in integers that we support/consider under `Extended` 32-93, 95, 97-126, 161, 191-194, 196, 199-202, 204-206, 209-212, 214, 217-220, 224-226, 228, 231-239, 241-244, 246, 249-252. The list of characters that we support under `Extended` are clearly a subset of ISO8859-1. For all chars outside of this list, we should use UTF8. We found that the messages received by Biztalk was not proper UTF8 as it was missing BOM headers. Once we added the BOM headers it worked with character set UTF8.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9488465" width="1" height="1"&gt;</content><author><name>Atin Agarwal</name><uri>http://blogs.msdn.com/members/Atin+Agarwal.aspx</uri></author><category term="EDI" scheme="http://blogs.msdn.com/atinag/archive/tags/EDI/default.aspx" /></entry><entry><title>UTF encoded message failing in Biztalk 2006</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/atinag/archive/2009/03/18/utf-encoded-message-failing-in-biztalk-2006.aspx" /><id>http://blogs.msdn.com/atinag/archive/2009/03/18/utf-encoded-message-failing-in-biztalk-2006.aspx</id><published>2009-03-18T17:51:40Z</published><updated>2009-03-18T17:51:40Z</updated><content type="html">&lt;p&gt;Receiving following error at the Receive Pipeline while using MSMQ adapter in Biztalk 2006: A message received by adapter &amp;quot;MSMQ&amp;quot; on receive location &amp;quot;xxxxxxxxxxx&amp;quot; with URI &amp;quot;xxxxxxxxxxx&amp;quot; is suspended. Error details: There was a failure executing the receive pipeline: &amp;quot;xxxxxxxxxxx&amp;quot;    &lt;br /&gt;Source: &amp;quot;XML Disassembler&amp;quot; Receive Port: &amp;quot;xxxxxxxxxxx&amp;quot; URI: &amp;quot;xxxxxxxxxxx&amp;quot; Reason: No Disassemble stage components can recognize the data. &lt;/p&gt;  &lt;p&gt;Also, the Biztalk 2004 accepted the message and processed it with no errors. The migrated it to Biztalk 2006. The issue started occurring after migrating to Biztalk 2006. Also, the same message would work with File Adapter in Biztalk 2006.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Solution:&lt;/strong&gt; &lt;/p&gt;  &lt;p&gt;Found that the messages are UTF-16 encoded but do not contain BOM header. It's stated that UTF-encoded messages need to have BOM and the solution is to have UTF-encoded messages with BOM. This is a standard and this check have been added from BTS2006 onwards. So that explains why it works in BTS2004 and fails in BTS2006. &lt;/p&gt;  &lt;p&gt;Either we has to use custom pipeline component to add BOM headers or has to modify the application to add BOM headers before sending message to Biztalk. Also, if you receive a UTF-encoded message without BOM header using a File Adapter, it will also fail. Usually what happens if we copy the message to a notepad and then save it, the encoding gets changed to ANSI, therefore it works. If it is not possible to change the application sending message, then a workaround is to create a custom pipeline component and use it in the receive pipeline to add the BOM header.&lt;/p&gt;  &lt;p&gt;For example, starting from SDK (c:\program files\Microsoft BizTalk Server 2006\SDK\Samples\Pipelines\CustomComponent\FixMsg) sample with following suggested changes:    &lt;br /&gt;In the file FixMsg.cs Change: Byte[ ] prependByteData = ConverToBytes(prependData);     &lt;br /&gt;With: byte[] prependByteData = new byte[]{239,187, 191}; //UTF8 Byte Order Mark     &lt;br /&gt;In the file FixMsg.cs Change: Byte[ ] prependByteData = ConverToBytes(prependData);     &lt;br /&gt;With: byte[] prependByteData = new byte[] {255,254}; // UTF16 Byte Order Mark&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9487019" width="1" height="1"&gt;</content><author><name>Atin Agarwal</name><uri>http://blogs.msdn.com/members/Atin+Agarwal.aspx</uri></author><category term="Biztalk" scheme="http://blogs.msdn.com/atinag/archive/tags/Biztalk/default.aspx" /><category term="Pipeline" scheme="http://blogs.msdn.com/atinag/archive/tags/Pipeline/default.aspx" /></entry><entry><title>Deadlock occurring between bts_InsertTrackingData and TDDS_GetTrackingRecord</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/atinag/archive/2009/01/02/deadlock-occurring-between-bts-inserttrackingdata-and-tdds-gettrackingrecord.aspx" /><id>http://blogs.msdn.com/atinag/archive/2009/01/02/deadlock-occurring-between-bts-inserttrackingdata-and-tdds-gettrackingrecord.aspx</id><published>2009-01-03T01:08:17Z</published><updated>2009-01-03T01:08:17Z</updated><content type="html">&lt;p&gt;Recently, I saw an issue where we were observing deadlocks between the stored procedures 'bts_InsertTrackingData' and 'TDDS_GetTrackingRecord' and this happens when there is a huge load for BizTalk to process. &lt;/p&gt;  &lt;p&gt;What we found that Tracking was enabled on multiple hosts. We disabled tracking on hosts such that we have only one tracking host and this resolved our issue. Pretty easy...This is what we always suggest to our customer to have a dedicated tracking host on production systems and especially where we expect high load as there it is expected that lot of tracking data will be generated. Using a dedicated tracking host also allows you to stop other BizTalk hosts without interfering with BizTalk Server tracking.&lt;/p&gt;  &lt;p&gt;Configuring a Dedicated Tracking Host: &lt;a title="http://msdn.microsoft.com/en-us/library/cc296633.aspx" href="http://msdn.microsoft.com/en-us/library/cc296633.aspx"&gt;http://msdn.microsoft.com/en-us/library/cc296633.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Also, by default, track events (like Orchestration start and end, Shape start and end) are enabled for Orchestration. We would recommend to disable these events especially the Shape start and end in Production. Mostly we require these data in development stage to troubleshoot Orchestration using Orchestration Debugger and not in production. You can disable it by going to Orchestration properties in BizTalk Admin Console. &lt;/p&gt;  &lt;p&gt;Important : If you do not require tracking data at all, better to turn off Global Tracking.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9269768" width="1" height="1"&gt;</content><author><name>Atin Agarwal</name><uri>http://blogs.msdn.com/members/Atin+Agarwal.aspx</uri></author><category term="deadlock" scheme="http://blogs.msdn.com/atinag/archive/tags/deadlock/default.aspx" /><category term="tracking" scheme="http://blogs.msdn.com/atinag/archive/tags/tracking/default.aspx" /></entry><entry><title>Messages not appearing in the dropdown box of Transform configuration</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/atinag/archive/2008/10/21/messages-not-appearing-in-the-dropdown-box-of-transform-configuration.aspx" /><id>http://blogs.msdn.com/atinag/archive/2008/10/21/messages-not-appearing-in-the-dropdown-box-of-transform-configuration.aspx</id><published>2008-10-21T17:34:00Z</published><updated>2008-10-21T17:34:00Z</updated><content type="html">&lt;p&gt;If we are using Multi-part Message inside Orchestration and we have any part which is of simple type, then we cannot directly access any message part of this Multi-part Message from the transform shape inside Orchestration.&lt;/p&gt;  &lt;p&gt;This is a limitation with the Multi-part Message type object. If the Multi-part Message type contains ONLY schema types, then only it can be directly accessed in a transform shape, otherwise we will not be able to access any of the parts from the transform shape. This is common when we try referencing a WSDL that contains both simple and complex type’s message parts, the resulting parts of the Multi-part Message type are not available for selection in the transform configuration of the orchestration.&lt;/p&gt;  &lt;p&gt;Let’s say we referred to a WSDL file and the resulting Multi-part Message Type contains parts both simple and schema types. In the below figure, the Multi-part message type contains 2 parts which are simple types (outlined in red) and 1 part which is schema type (outlined in green). &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/MessagesnotappearinginthedropdownboxofTr_11A34/image_4.png" mce_href="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/MessagesnotappearinginthedropdownboxofTr_11A34/image_4.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/MessagesnotappearinginthedropdownboxofTr_11A34/image_thumb_1.png" width="386" height="372" mce_src="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/MessagesnotappearinginthedropdownboxofTr_11A34/image_thumb_1.png" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Now, create a message of this Web Message Type.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;a href="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/MessagesnotappearinginthedropdownboxofTr_11A34/image_42.png" mce_href="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/MessagesnotappearinginthedropdownboxofTr_11A34/image_42.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/MessagesnotappearinginthedropdownboxofTr_11A34/image_thumb_20.png" width="458" height="512" mce_src="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/MessagesnotappearinginthedropdownboxofTr_11A34/image_thumb_20.png" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;If we drop a transform shape in the orchestration, we will not see any message in the drop down box. It means that we cannot directly access any part of this Multi-part message from the transform shape.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/MessagesnotappearinginthedropdownboxofTr_11A34/image_40.png" mce_href="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/MessagesnotappearinginthedropdownboxofTr_11A34/image_40.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/MessagesnotappearinginthedropdownboxofTr_11A34/image_thumb_19.png" width="481" height="406" mce_src="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/MessagesnotappearinginthedropdownboxofTr_11A34/image_thumb_19.png" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;So now the question is how do we construct this Multi-part Message so that we can call our web-service? Lets figure it out.&lt;/p&gt;  &lt;p&gt;The workaround is first create a message in the Orchestration View for the schema type part of multi-part message.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/MessagesnotappearinginthedropdownboxofTr_11A34/Untitled_2.jpg" mce_href="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/MessagesnotappearinginthedropdownboxofTr_11A34/Untitled_2.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Untitled" border="0" alt="Untitled" src="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/MessagesnotappearinginthedropdownboxofTr_11A34/Untitled_thumb.jpg" width="460" height="500" mce_src="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/MessagesnotappearinginthedropdownboxofTr_11A34/Untitled_thumb.jpg" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Then, we can now select this message in the transform configuration. Now we can easily construct this part of the multi-part message in the transform shape.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/MessagesnotappearinginthedropdownboxofTr_11A34/untitled3.png" mce_href="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/MessagesnotappearinginthedropdownboxofTr_11A34/untitled3.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="untitled3" border="0" alt="untitled3" src="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/MessagesnotappearinginthedropdownboxofTr_11A34/untitled3_thumb.png" width="556" height="469" mce_src="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/MessagesnotappearinginthedropdownboxofTr_11A34/untitled3_thumb.png" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Now, only thing remaining is to construct the Multi-part message. Once we have construct the schema type parts, we can easily construct the Multi-part message using Message Assignment Shape as shown in below figure. Here we have directly assigned values to the simple type parts and assigned the above create schema type message to the schema part of Multi-part message.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;a href="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/MessagesnotappearinginthedropdownboxofTr_11A34/untitled_1.png" mce_href="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/MessagesnotappearinginthedropdownboxofTr_11A34/untitled_1.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="untitled" border="0" alt="untitled" src="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/MessagesnotappearinginthedropdownboxofTr_11A34/untitled_thumb_1.png" width="604" height="438" mce_src="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/MessagesnotappearinginthedropdownboxofTr_11A34/untitled_thumb_1.png" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p mce_keep="true"&gt; So, this is how my orchestration looks like.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/MessagesnotappearinginthedropdownboxofTr_11A34/untitled1.png" mce_href="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/MessagesnotappearinginthedropdownboxofTr_11A34/untitled1.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="untitled1" border="0" alt="untitled1" src="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/MessagesnotappearinginthedropdownboxofTr_11A34/untitled1_thumb.png" width="1004" height="592" mce_src="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/MessagesnotappearinginthedropdownboxofTr_11A34/untitled1_thumb.png" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Please let me know if you got any comments or questions.&lt;/p&gt;  &lt;p&gt;I hope it helps! &lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9009696" width="1" height="1"&gt;</content><author><name>Atin Agarwal</name><uri>http://blogs.msdn.com/members/Atin+Agarwal.aspx</uri></author><category term="Orchestration" scheme="http://blogs.msdn.com/atinag/archive/tags/Orchestration/default.aspx" /><category term="Multi-part Message" scheme="http://blogs.msdn.com/atinag/archive/tags/Multi-part+Message/default.aspx" /></entry><entry><title>BAM SSIS package BAM_DM_&lt;activity_name&gt; not archiving data</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/atinag/archive/2008/09/23/bam-ssis-package-bam-dm-activity-name-not-archiving-data.aspx" /><id>http://blogs.msdn.com/atinag/archive/2008/09/23/bam-ssis-package-bam-dm-activity-name-not-archiving-data.aspx</id><published>2008-09-23T23:31:22Z</published><updated>2008-09-23T23:31:22Z</updated><content type="html">&lt;p&gt;Ever wondered why the BAM SSIS packages for archiving (BAM_DM_&amp;lt;activity_name&amp;gt;) is not archiving the data from BAMPrimaryImport DB to BAMArchive DB though we see that the package executes successfully.&lt;/p&gt;  &lt;p&gt;Ok. This may be the reason.&lt;/p&gt;  &lt;p&gt;The BAM SSIS packages for archiving (BAM_DM_&amp;lt;ActivityName&amp;gt;) are a two step process. They handle partitioning and archiving. During each run, the activity tables are partitioned, meaning a new set of tables are created in the BAM Primary Import DB for the Completed Instances and Completed Relationships table of that BAM activity. Next the package will check if there are any partition tables where the creation time of the partition table falls out of the online window. We need to&amp;#160; check the bam_Metadata_Partitions table which maintains a row for each partition per activity including when the partition was created. Data is moved to Archive DB based on the partition falling outside of the online time window.&lt;/p&gt;  &lt;p&gt;In one of a customer scenario, the online window for the activity was set to 90 days and we found out from the bam_Metadata_Partitions table that the oldest partition was around 1 month old only (i.e.the DM SSIS package was run for the first time 1 month before). It means that this partition will be archived once the duration specified for online window completes (i.e. after 2 months from now). If we want to wish to archive the data sooner, only way is to reduce the online window duration using ‘bm.exe set-activitywindow’ command and re-run the SSIS package. &lt;/p&gt;  &lt;p&gt;I hope it helps!&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8962704" width="1" height="1"&gt;</content><author><name>Atin Agarwal</name><uri>http://blogs.msdn.com/members/Atin+Agarwal.aspx</uri></author><category term="database" scheme="http://blogs.msdn.com/atinag/archive/tags/database/default.aspx" /><category term="BAM" scheme="http://blogs.msdn.com/atinag/archive/tags/BAM/default.aspx" /></entry><entry><title>KB Article on maintenance of Biztalk databases</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/atinag/archive/2008/09/12/kb-article-on-maintenance-of-biztalk-databases.aspx" /><id>http://blogs.msdn.com/atinag/archive/2008/09/12/kb-article-on-maintenance-of-biztalk-databases.aspx</id><published>2008-09-12T20:14:56Z</published><updated>2008-09-12T20:14:56Z</updated><content type="html">&lt;p&gt;Yesterday, KB &lt;a href="http://support.microsoft.com/kb/952555/en-us"&gt;952555&lt;/a&gt; got published which talks about how to maintain and troubleshoot Biztalk Server databases. This is a very useful article and must to be followed if you want Biztalk to be in good shape specially if performance is a key factor. &lt;/p&gt;  &lt;p&gt;Thank you, Mandi, for writing this wonderful article.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8947520" width="1" height="1"&gt;</content><author><name>Atin Agarwal</name><uri>http://blogs.msdn.com/members/Atin+Agarwal.aspx</uri></author><category term="performance" scheme="http://blogs.msdn.com/atinag/archive/tags/performance/default.aspx" /><category term="database" scheme="http://blogs.msdn.com/atinag/archive/tags/database/default.aspx" /></entry><entry><title>How to join two schemas in a map when they contain namespaces</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/atinag/archive/2008/08/26/how-to-join-two-schemas-in-a-map-when-they-contain-namespaces.aspx" /><link rel="enclosure" type="application/x-zip-compressed" length="87752" href="http://blogs.msdn.com/atinag/attachment/8898000.ashx" /><id>http://blogs.msdn.com/atinag/archive/2008/08/26/how-to-join-two-schemas-in-a-map-when-they-contain-namespaces.aspx</id><published>2008-08-26T21:01:00Z</published><updated>2008-08-26T21:01:00Z</updated><content type="html">&lt;p&gt;&lt;strong&gt;Problem Statement:&lt;/strong&gt; I will be receiving two different messages (Message1 and Message2) inside orchestration each with multiple records. Now, I have to join these messages in a map inside orchestration based on TRANID and PROCID. So basically, I have to get the value of TRANID from Message1 and look for the record inside Message2 where value of PROCID matches to value of TRANID and get the value of SUM element and populate it in the output message and this process have to be repeated for every TRAN record of Message1. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/Howtojointwoschemasinamapwhentheycontain_1484C/clip_image002_2.jpg" mce_href="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/Howtojointwoschemasinamapwhentheycontain_1484C/clip_image002_2.jpg"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" border="0" alt="clip_image002" src="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/Howtojointwoschemasinamapwhentheycontain_1484C/clip_image002_thumb.jpg" width="244" height="114" mce_src="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/Howtojointwoschemasinamapwhentheycontain_1484C/clip_image002_thumb.jpg" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Input Message1&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/Howtojointwoschemasinamapwhentheycontain_1484C/clip_image004_2.jpg" mce_href="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/Howtojointwoschemasinamapwhentheycontain_1484C/clip_image004_2.jpg"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" border="0" alt="clip_image004" src="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/Howtojointwoschemasinamapwhentheycontain_1484C/clip_image004_thumb.jpg" width="244" height="111" mce_src="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/Howtojointwoschemasinamapwhentheycontain_1484C/clip_image004_thumb.jpg" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Input Message2&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/Howtojointwoschemasinamapwhentheycontain_1484C/clip_image006_2.jpg" mce_href="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/Howtojointwoschemasinamapwhentheycontain_1484C/clip_image006_2.jpg"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" border="0" alt="clip_image006" src="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/Howtojointwoschemasinamapwhentheycontain_1484C/clip_image006_thumb.jpg" width="191" height="144" mce_src="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/Howtojointwoschemasinamapwhentheycontain_1484C/clip_image006_thumb.jpg" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Output Message&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Solution:&lt;/strong&gt; There is already a very good solution for this and I found it at this blog &amp;lt;&lt;a href="http://geekswithblogs.net/synboogaloo/archive/2005/04/22/37335.aspx" mce_href="http://geekswithblogs.net/synboogaloo/archive/2005/04/22/37335.aspx"&gt;http://geekswithblogs.net/synboogaloo/archive/2005/04/22/37335.aspx&lt;/a&gt;&amp;gt;. But only thing is that in my case, input schema contains namespace which complicates the XPATH Query used in XSLT Call Template. Let us figure it out later, how to quickly build XPATH query using namespaces in this scenario.&lt;/p&gt;  &lt;p&gt;1) First, create the schema for the three messages. &lt;/p&gt;  &lt;p&gt;2) Now create orchestration like below. It will receive these two input messages, constructs the output message using map inside Transform shape and then sends the output to a file location. Since we have to receive two different messages using File adapter and we do not have any unique identifier for correlation purpose, I used BTS.ReceivePortName for correlation. Though, this may not be very practical, I just want to demonstrate joining of two schemas when they have got namespace. But yes, make sure that both the receive locations are in the same Receive Port.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/Howtojointwoschemasinamapwhentheycontain_1484C/image_10.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/Howtojointwoschemasinamapwhentheycontain_1484C/image_thumb_4.png" width="631" height="356" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;3) In the transform shape, select the msgInput1 and msgInput2 as Inputs and msgOutput as Output. Open the map now.&lt;/p&gt;  &lt;p&gt;4) In the map, put a looping functoid as in the figure below. Link TRANID and DESC from input to output. The main thing remaining is to retrieve value of SUM from INPUT2 when TRANID matches to PROCID. Now drop a scripting functoid to the map and connect it to TRANID as Input and SUM as Output. It should look something like below.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/Howtojointwoschemasinamapwhentheycontain_1484C/image_8.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/Howtojointwoschemasinamapwhentheycontain_1484C/image_thumb_3.png" width="631" height="252" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;5) Now, for the scripting functoid, things would have been something like below if the schema does not have the namespaces. But here, this XPATH query inside the &amp;#8216;Inline XSLT Call Template&amp;#8217; will give us only blank results. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/Howtojointwoschemasinamapwhentheycontain_1484C/image_6.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/Howtojointwoschemasinamapwhentheycontain_1484C/image_thumb_2.png" width="520" height="464" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;6) So we need to use the namespaces prefix in out query to get the desired output. Now we need to find out the namespace prefix being used in map for INPUT 2 schema. To find it out, we need to view the XSLT of the map. Therefore, we have to validate the map file first. So, right click the map file and say validate map. Now in the output, we will get a link to the map XSLT. Open this XSL file. Now in this XSL file, we can find the prefix used for the namespace &amp;#8220;http:\\Input2&amp;#8221; and that is &amp;#8216;&lt;b&gt;s1&lt;/b&gt;&amp;#8217;. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/Howtojointwoschemasinamapwhentheycontain_1484C/image_4.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/Howtojointwoschemasinamapwhentheycontain_1484C/image_thumb_1.png" width="632" height="442" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;7) Now, use the prefix &amp;quot;s1&amp;quot; inside the XPATH Query as below. There could be other ways to use XPATH Query but this was the best I could figure out.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/Howtojointwoschemasinamapwhentheycontain_1484C/image_2.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/atinag/WindowsLiveWriter/Howtojointwoschemasinamapwhentheycontain_1484C/image_thumb.png" width="520" height="464" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;8) Deploy the solution and test it. That&amp;#8217;s all.&lt;/p&gt;  &lt;p&gt;You can download my Biztalk project and try it. If you got a better solution than this, please let me know. I would really be interested in knowing that.&lt;/p&gt;  &lt;p&gt;I hope this post helps! &lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8898000" width="1" height="1"&gt;</content><author><name>Atin Agarwal</name><uri>http://blogs.msdn.com/members/Atin+Agarwal.aspx</uri></author></entry><entry><title>Simple things causing BIG things</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/atinag/archive/2008/07/24/simple-things-causing-big-things.aspx" /><id>http://blogs.msdn.com/atinag/archive/2008/07/24/simple-things-causing-big-things.aspx</id><published>2008-07-24T10:27:00Z</published><updated>2008-07-24T10:27:00Z</updated><content type="html">&lt;P&gt;Recently, I was working on an interesting case where we were not able to configure&amp;nbsp;Biztalk Rules Engine in Biztalk Server 2006. All the other components got configured sucesfully but BRE was failing with error "Rule Engine Update Service is not a valid Win32 application" in the event logs. Now, it was getting pretty urgent for customer.&lt;/P&gt;
&lt;P&gt;Now, the thing was&amp;nbsp;looking simple with&amp;nbsp;KB &lt;A class="" title=812486 href="http://support.microsoft.com/kb/812486" mce_href="http://support.microsoft.com/kb/812486"&gt;812486&lt;/A&gt;&amp;nbsp;but as the configuration wizard fails, it deletes the &lt;BR&gt;RuleEngineUpdateService and the associated registry as well. So we do not get a chance to modify the image path in the registry.&lt;/P&gt;
&lt;P&gt;Next thing we looked for a folder with name 'Program' under the root drive (i.e. C:\) as per KB&amp;nbsp;&lt;A class="" title=812486 href="http://support.microsoft.com/kb/812486" mce_href="http://support.microsoft.com/kb/812486"&gt;812486&lt;/A&gt; and could &lt;BR&gt;not find any such&amp;nbsp;folder . Now, it was after sometime only, that it strike our mind that it could be a file with the name 'Program' and that was it. After removing this file, BRE got configured succesfully.&lt;/P&gt;
&lt;P&gt;The question here is how did this file 'Program' got created under root drive. We can't answer this. :)&lt;/P&gt;
&lt;P&gt;I hope it helps! (atleast to few)&amp;nbsp;Rest, we are always here :)&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8768967" width="1" height="1"&gt;</content><author><name>Atin Agarwal</name><uri>http://blogs.msdn.com/members/Atin+Agarwal.aspx</uri></author><category term="BRE" scheme="http://blogs.msdn.com/atinag/archive/tags/BRE/default.aspx" /></entry></feed>