<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>One Blog for Biztalk Engineers</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/biztalkcpr/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/biztalkcpr/feed.xml</link>
    <description>A blog about Biztalk written by Biztalk Support Engineers</description>
    <lastBuildDate>Tue, 16 Apr 2019 04:47:08 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Final Version of BizTalk Terminator Tool Released</title>
      <link>https://docs.microsoft.com/archive/blogs/biztalkcpr/final-version-of-biztalk-terminator-tool-released</link>
      <pubDate>Wed, 14 Dec 2016 22:42:35 GMT</pubDate>
      <dc:creator><![CDATA[Shaheer Abubucker]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/biztalkcpr/?p=1515</guid>
      <description><![CDATA[I just wanted to announce that the final version of the standalone BizTalk Terminator tool - v2.5 -...]]></description>
      <content:encoded><![CDATA[I just wanted to announce that the final version of the standalone BizTalk Terminator tool - v2.5 - has just been released.

Terminator functionality is not going away.
All further development will continue via the maintenance node in BizTalk Health Monitor (BHM).

Below is a quick comparison of the two versions of Terminator:

&nbsp;
<table style="width: 100%" border="1">
<tbody>
<tr>
<td style="text-align: center"><b>Tool Version</b></td>
<td style="text-align: center"><b>Standalone Terminator</b></td>
<td style="text-align: center"><b>BHM Terminator</b></td>
</tr>
<tr>
<td style="text-align: center"><b>Available as</b></td>
<td style="text-align: center"><a target="_blank" href="https://www.microsoft.com/en-us/download/details.aspx?id=2846" rel="noopener">a standalone tool</a></td>
<td style="text-align: center"><a target="_blank" href="https://blogs.msdn.microsoft.com/biztalkcpr/2015/06/29/biztalk-terminator-now-available-via-bhm/" rel="noopener">maintenance node within BHM</a></td>
</tr>
<tr>
<td style="text-align: center"><b>Recommended for </b></td>
<td style="text-align: center">BizTalk 2004 - 2009</td>
<td style="text-align: center">BizTalk 2010 and above</td>
</tr>
<tr>
<td style="text-align: center"><b>Supports </b></td>
<td style="text-align: center">BizTalk 2004 - 2013 R2</td>
<td style="text-align: center">BizTalk 2010 and above</td>
</tr>
<tr>
<td style="text-align: center"><b>Future Tool Updates </b></td>
<td style="text-align: center">No
Version 2.5 is the final version.
Support for BTS2016 or above will not be added.</td>
<td style="text-align: center">Yes
All tool updates happen here.
BTS2016 support just added in BHM v4</td>
</tr>
<tr>
<td style="text-align: center"><b>Future Task Repository Updates</b></td>
<td style="text-align: center">Yes
Via <em>Update Task Repository</em> menu item (see below).
Only repository updates for BTS2013R2 or below.</td>
<td style="text-align: center">Yes
Via <a target="_blank" href="https://blogs.msdn.microsoft.com/biztalkhealthmonitor/2015/12/22/biztalk-health-monitor-v3-2-released/#repositories" rel="noopener">auto-update mechanism</a>.
All repository updates will apply</td>
</tr>
<tr>
<td style="text-align: center"><b>Tool Expiration</b></td>
<td style="text-align: center">No more time bomb with v2.5</td>
<td style="text-align: center">No</td>
</tr>
</tbody>
</table>
&nbsp;

<strong><em>Update Task Repository</em> Menu Item in Standalone Terminator</strong>
<ul>
 	<li>When you open Terminator, click the Help menu at the top left and you will see the <em>Update Task Repository</em> menu item.</li>
 	<li>Clicking this does the following:
<ul>
 	<li>Renames the existing MaintenanceRep.dll (located in the same folder as Terminator) to MaintenanceRep[DATETIME].dll</li>
 	<li>Downloads the current MaintenanceRep.dll from Azure</li>
</ul>
</li>
 	<li>This feature requires external internet access as well as .NET 4.0 or above for Azure connectivity.  If you don't have either of those on your BizTalk machine, you will need to run Terminator on a box that does and then just copy over the new MaintenanceRep.dll onto your BizTalk machine.  The box where you do this does not need to have access to BizTalk.</li>
 	<li>The <em>Update Task Repository</em> menu item is disabled once Terminator connects to a BizTalk environment.  You will need to close and re-open Terminator for it to be re-enabled.</li>
 	<li>I would recommend updating the task repository every month or so.</li>
</ul>
&nbsp;]]></content:encoded>
    </item>
    <item>
      <title>BizTalk 2013 R2 CU1 install failing with “Package does not contain compatible branch patch”</title>
      <link>https://docs.microsoft.com/archive/blogs/biztalkcpr/biztalk-2013-r2-cu1-install-failing-with-package-does-not-contain-compatible-branch-patch</link>
      <pubDate>Fri, 10 Jul 2015 06:15:00 GMT</pubDate>
      <dc:creator><![CDATA[Shaheer Abubucker]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/biztalkcpr/2015/07/10/biztalk-2013-r2-cu1-install-failing-with-package-does-not-contain-compatible-branch-patch/</guid>
      <description><![CDATA[We've had a number of people run into the following issue so I just wanted to provide an explanation...]]></description>
      <content:encoded><![CDATA[<p>We've had a number of people run into the following issue so I just wanted to provide an explanation and solution.</p>
<p>&nbsp;</p>
<p><span style="font-size: medium;"><strong>Issue:</strong></span></p>
<p>BizTalk 2013 R2 Cumulative Update 1 (CU1) install fails with &ldquo;Package does not contain compatible branch patch&rdquo; error:</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/96/90/0361.BTS2013R2CU1Error.jpg" original-url="https://blogs.msdn.com/cfs-filesystemfile.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-96-90/0361.BTS2013R2CU1Error.jpg"><img style="max-width: 550px;" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/96/90/0361.BTS2013R2CU1Error.jpg" original-url="https://blogs.msdn.com/cfs-filesystemfile.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-96-90/0361.BTS2013R2CU1Error.jpg" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p><span style="font-size: medium;"><strong>Explanation:</strong></span></p>
<p>This issue is happening in environments where a version of BizTalk Health Monitor (BHM) from the Microsoft Download Center has been placed within the BizTalk installation folder.</p>
<p>There are 2 branches of BHM:</p>
<ol>
<li><strong>OOB BHM</strong>&nbsp;&ndash; shipped out-of-the-box with BTS2013 R2</li>
<li><strong>DLC BHM</strong> &ndash; shipped via Microsoft Download Center</li>
</ol>
<p>OOB BHM has had 2 released versions so far.&nbsp; Version 2.0.0.0&nbsp;shipped with BizTalk 2013 R2 RTM and version 3.1.5632.20684 shipped with BizTalk 2013 R2 CU1.</p>
<p>OOB BHM is located at \SDK\Utilities\Support Tools\BizTalkHealthMonitor within the BizTalk installation folder (default installation folder is C:\Program Files (x86)\Microsoft BizTalk Server 2013 R2)</p>
<p>DLC BHM has had many versions and is currently at 3.1.5654.28025.</p>
<p>The BTS2013R2 CU1 installer throws the&nbsp;above mentioned&nbsp;error if it finds any version of BHM within the BizTalk installation folder that is not a part of the OOB BHM branch.</p>
<p>We have seen this issue in environments where the user did one of the following:</p>
<ol>
<li>Replaced the OOB BHM binaries&nbsp;in the \SDK\Utilities\Support Tools\BizTalkHealthMonitor folder with a version of DLC BHM</li>
<li>Created a new folder with a version of DLC BHM anywhere within the BizTalk installation folder</li>
</ol>
<p>&nbsp;</p>
<p><span style="font-size: medium;"><strong>Solution:</strong></span></p>
<p>To allow CU1 to install, simply move the folder containing DLC BHM out of the BizTalk installation folder and run the installer again.</p>
<p>Moving forward, never place any DLC BHM version within the BizTalk installation folder.</p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>BizTalk Terminator STILL Not Cleaning Up Caching Items?</title>
      <link>https://docs.microsoft.com/archive/blogs/biztalkcpr/biztalk-terminator-still-not-cleaning-up-caching-items</link>
      <pubDate>Mon, 29 Jun 2015 12:28:00 GMT</pubDate>
      <dc:creator><![CDATA[Shaheer Abubucker]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/biztalkcpr/2015/06/29/biztalk-terminator-still-not-cleaning-up-caching-items/</guid>
      <description><![CDATA[I originally published my BizTalk Terminator Not Cleaning Up Caching Items blog back in 2011 where I...]]></description>
      <content:encoded><![CDATA[<p>I originally published my <a href="https://blogs.msdn.com/b/biztalkcpr/archive/2011/08/24/biztalk-terminator-not-cleaning-up-caching-items.aspx">BizTalk Terminator Not Cleaning Up Caching Items</a> blog back in 2011 where I suggested to use the <em>Terminate Multiple Instances (Hard Termination)</em> task if the normal WMI-based <em>Terminate Cache Instances</em> task doesn't clean up all the caching instances.</p>
<p>Since then, I've come across a caching cleanup scenario that even the hard termination task can't handle.&nbsp; Basically, if there are cache message refs (in &lt;HOST&gt;Q or &lt;HOST&gt;Q_Suspended tables) that are missing their associated caching instance (in the Instances table), then even the hard termination task won't be able to clean them up.&nbsp; The reason is that the <em>Terminate Multiple Instances (Hard Termination)</em> task finds the instances for termination by looking through the Instances table - so in this case it never sees the orphaned cache message refs.</p>
<p>If you run into this scenario, what you will see is that that once <em>Hard Termination</em> has successfully cleaned up all caching instances, BHM or MBV will continue to complain about cache messages and if you run the <em>View Count of Cache Messages in All Host Queues</em> task, it will show Cache Messages and Message Refs existing even though there are no Associated Cache Instances:</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/96/90/1667.CacheMessages.JPG" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-96-90/1667.CacheMessages.JPG"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/96/90/1667.CacheMessages.JPG" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-96-90/1667.CacheMessages.JPG" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p>The workaround so far has been to to first run the <em>DELETE Orphaned Messages In All Hosts</em> task (to clean up the orphaned message refs) and then run the <em>Terminate Multiple Instances (Hard Termination)</em> task as mentioned in the previous blog (to clean up the cache instances).</p>
<p><span style="color: #ff0000; font-size: small;">I have also created a new cache cleanup task called <strong><em>Terminate Caching Items (Hard Termination)</em>.&nbsp;</strong> This task checks all the &lt;HOST&gt;Q, &lt;HOST&gt;Q_Suspended, and Instances tables for caching items associated with any host and in any state and cleans them all up.&nbsp; The purpose of this new task is to handle all cache item cleanup scenarios with one&nbsp;step - so the user doesn't have to dig into the state of the cache items in their environment to know how to clean them up.&nbsp; So if BHM or MBV complain about cache items, simply running this task on the correct MessageBox should take care of it.&nbsp; </span></p>
<p>This new&nbsp;task is available in <a href="https://www.microsoft.com/en-us/download/details.aspx?id=43716">BHM v3.1</a> and <a href="https://www.microsoft.com/en-us/download/details.aspx?id=2846">Terminator&nbsp;v2.2</a>.</p>
<p>If you were not already aware that Terminator has been integrated into the BizTalk Health Monitor (BHM) tool, see <a href="https://blogs.msdn.com/b/biztalkcpr/archive/2015/06/29/biztalk-terminator-now-available-via-bhm.aspx">here</a>.</p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>BizTalk Terminator - Now Available via BHM</title>
      <link>https://docs.microsoft.com/archive/blogs/biztalkcpr/biztalk-terminator-now-available-via-bhm</link>
      <pubDate>Mon, 29 Jun 2015 11:13:56 GMT</pubDate>
      <dc:creator><![CDATA[Shaheer Abubucker]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/biztalkcpr/2015/06/29/biztalk-terminator-now-available-via-bhm/</guid>
      <description><![CDATA[I just wanted to let everyone know that BizTalk Terminator is now also available as a part of...]]></description>
      <content:encoded><![CDATA[I just wanted to let everyone know that BizTalk Terminator is now also available as a part of BizTalk Health Monitor (BHM) - the new BizTalk tool that integrates MBV and Terminator functionality into an MMC Snap-In that you can run as a part of your BizTalk Admin Console.

&nbsp;

<span style="color: #ff0000;font-size: medium"><em>Update:  Final version of standalone Terminator released.
More info <a target="_blank" href="https://blogs.msdn.microsoft.com/biztalkcpr/2016/12/14/final-version-of-biztalk-terminator-tool-released/">here</a> - including a comparison of the 2 versions of Terminator.</em></span>

&nbsp;

Terminator functionality can be found in BHM's Maintenance node:

<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/96/90/7357.MaintenanceNode.JPG"><img alt="" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/96/90/8816.MaintenanceNodeTN.jpg" border="0" /></a>
<ul>
 	<li><span style="font-size: small">You must be on BHM v3 or above to get the Terminator functionality</span></li>
 	<li><strong><span style="font-size: small">Get BHM from <a href="https://www.microsoft.com/en-us/download/details.aspx?id=43716">https://www.microsoft.com/en-us/download/details.aspx?id=43716</a></span></strong></li>
 	<li><span style="font-size: small">See <a href="https://blogs.msdn.com/b/biztalkhealthmonitor/archive/2015/03/06/biztalk-health-monitor-v3-released.aspx">here</a> for a walkthrough of BHM v3 functionality - including Terminator integration.</span></li>
 	<li><span style="font-size: small">See the BHM blog at <a href="https://blogs.msdn.com/b/biztalkhealthmonitor">https://blogs.msdn.com/b/biztalkhealthmonitor</a> for more information on BHM.</span></li>
 	<li><span style="font-size: small">So far, I've included the most popular Terminator tasks in BHM and plan to add more over time</span></li>
 	<li><span style="font-size: small">BHM officially supports BizTalk 2010, 2013, 2013R2, and 2016.</span></li>
 	<li><span style="font-size: small"><del>I'm going to continue updating standalone Terminator for now and it is still available here.</del>  </span></li>
 	<li><span style="font-size: small"><del>At some point, I'll probably end up creating a final build of the standalone version and move all new development to BHM.  I'll update this blog once that decision is made.</del></span></li>
 	<li><span style="font-size: small">Standalone Terminator tool is <a target="_blank" href="https://blogs.msdn.microsoft.com/biztalkcpr/2016/12/14/final-version-of-biztalk-terminator-tool-released/">no longer being updated</a>. </span><span style="font-size: small">The f<span style="font-size: small">inal version of standalone Terminator is </span><a target="_blank" href="https://www.microsoft.com/en-us/download/details.aspx?id=2846"><span style="font-size: small">v2.5</span></a><span style="font-size: small">.  All new development (including BTS2016 support) is happening in BHM Terminator.  </span></span></li>
 	<li><span style="font-size: small"><del></del></span><span style="font-size: small">MBV is<a href="https://blogs.technet.com/b/jpierauc/archive/2015/01/08/no-more-updates-of-msgboxviewer-now-replaced-by-quot-biztalk-health-monitor-quot-bhm.aspx"> no longer being updated</a> and the last update to it was in July 2014.  To make sure you are using the latest MBV repository with the latest rules/queries, be sure to move to BHM.</span></li>
</ul>]]></content:encoded>
    </item>
    <item>
      <title>BizTalk 2013 or 2010 Hosts Crashing</title>
      <link>https://docs.microsoft.com/archive/blogs/biztalkcpr/biztalk-2013-hosts-crashing</link>
      <pubDate>Mon, 23 Sep 2013 07:02:00 GMT</pubDate>
      <dc:creator><![CDATA[Shaheer Abubucker]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/biztalkcpr/2013/09/23/biztalk-2013-hosts-crashing/</guid>
      <description><![CDATA[I&rsquo;ve seen some posts on some discussion boards and blogs and support cases opened on this...]]></description>
      <content:encoded><![CDATA[<p>I&rsquo;ve seen some posts on some discussion boards and blogs and support cases opened on this BTS2013 issue so I just wanted to&nbsp;provide some general information about the problem, what your workaround options are, and details on the fix.&nbsp;</p>
<h2><span style="font-size: large;"><strong>Problem</strong></span></h2>
<p>Periodically, your BizTalk host process crashes with the following errors in the eventlogs.&nbsp; Note the error code is 80131544.&nbsp; If you see the same error with a different code, you&rsquo;re likely running into a different issue.</p>
<p>Also, notice none of the errors come from event source BizTalk Server.&nbsp; The ones in the Application event logs come from .NET Runtime and Application Error and the one in the System event logs comes from Service Control Manager.</p>
<p style="padding-left: 30px;"><br /><span style="color: #ff0000; background-color: #ffff00;">Log Name:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Application</span><br /><span style="color: #ff0000; background-color: #ffff00;">Source:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .NET Runtime</span><br /><span style="color: #ff0000;">Date:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 9/20/2013 3:47:42 PM</span><br /><span style="color: #ff0000; background-color: #ffff00;">Event ID:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1023</span><br /><span style="color: #ff0000;">Task Category: None</span><br /><span style="color: #ff0000;">Level:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Error</span><br /><span style="color: #ff0000;">Keywords:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Classic</span><br /><span style="color: #ff0000;">User:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; N/A</span><br /><span style="color: #ff0000;">Computer:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; servername</span><br /><span style="color: #ff0000;">Description:</span><br /><span style="color: #ff0000;">Application: <span style="background-color: #ffff00;">BTSNTSvc64.exe</span></span><br /><span style="color: #ff0000;">Framework Version: v4.0.30319</span><br /><span style="color: #ff0000;">Description: The process was terminated due to an internal error in the .NET Runtime at IP 000007FDED170BC1 (000007FDECE00000) with exit code <span style="background-color: #ffff00;">80131544</span>.</span></p>
<p style="padding-left: 60px;">&nbsp;</p>
<p style="padding-left: 30px;"><span style="color: #ff0000; background-color: #ffff00;">Log Name:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Application</span><br /><span style="color: #ff0000; background-color: #ffff00;">Source:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Application Error</span><br /><span style="color: #ff0000;">Date:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 9/20/2013 3:47:42 PM</span><br /><span style="color: #ff0000; background-color: #ffff00;">Event ID:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1000</span><br /><span style="color: #ff0000;">Task Category: (100)</span><br /><span style="color: #ff0000;">Level:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Error</span><br /><span style="color: #ff0000;">Keywords:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Classic</span><br /><span style="color: #ff0000;">User:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; N/A</span><br /><span style="color: #ff0000;">Computer:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; servername</span><br /><span style="color: #ff0000;">Description:</span><br /><span style="color: #ff0000;">Faulting application name: <span style="background-color: #ffff00;">BTSNTSvc64.exe</span>, version: 3.10.229.0, time stamp: 0x50fe567a</span><br /><span style="color: #ff0000;">Faulting module name: clr.dll, version: 4.0.30319.19106, time stamp: 0x51a512d4</span><br /><span style="color: #ff0000;">Exception code: <span style="background-color: #ffff00;">0x80131544</span></span><br /><span style="color: #ff0000;">Fault offset: 0x0000000000370bc1</span><br /><span style="color: #ff0000;">Faulting process id: 0xca8</span><br /><span style="color: #ff0000;">Faulting application start time: 0x01ceb6394f1dd32a</span><br /><span style="color: #ff0000;">Faulting application path: C:\Program Files (x86)\Microsoft BizTalk Server 2013\BTSNTSvc64.exe</span><br /><span style="color: #ff0000;">Faulting module path: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll</span><br /><span style="color: #ff0000;">Report Id: 830374f6-222d-11e3-93f8-00155d4683a2</span><br /><span style="color: #ff0000;">Faulting package full name: </span><br /><span style="color: #ff0000;">Faulting package-relative application ID:</span>&nbsp;&nbsp;</p>
<p style="padding-left: 60px;">&nbsp;</p>
<p style="padding-left: 30px;"><span style="background-color: #ffff00;"><span style="color: #ff0000;">L</span><span style="color: #ff0000;">og Name:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System</span></span><br /><span style="color: #ff0000; background-color: #ffff00;">Source:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Service Control Manager</span><br /><span style="color: #ff0000;">Date:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 9/20/2013 3:47:43 PM</span><br /><span style="color: #ff0000; background-color: #ffff00;">Event ID:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 7031</span><br /><span style="color: #ff0000;">Task Category: None</span><br /><span style="color: #ff0000;">Level:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Error</span><br /><span style="color: #ff0000;">Keywords:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Classic</span><br /><span style="color: #ff0000;">User:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; N/A</span><br /><span style="color: #ff0000;">Computer:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; servername</span><br /><span style="color: #ff0000;">Description:</span><br /><span style="color: #ff0000;">The BizTalk Service BizTalk Group :&nbsp;BTSOrchHost service terminated unexpectedly.&nbsp; It has done this 2 time(s).&nbsp; The following corrective action will be taken in 60000 milliseconds: Restart the service.</span></p>
<p style="padding-left: 30px;">&nbsp;</p>
<h2><strong><span style="font-size: large;">Root Cause</span></strong></h2>
<p>There is a change in the .NET 4.5 CLR that results in the BizTalk process crashing during XLANG AppDomain shutdown.&nbsp; XLANG AppDomain Shutdown is when the .NET AppDomain that contains the Orchestration Engine tears itself down during periods of inactivity or idleness.&nbsp;</p>
<p>The Orchestration engine&rsquo;s AppDomain shuts down by default after 20 minutes of idleness (all orchestration instances are dehydrateable) or 30 minutes of inactivity (no orchestration instances exist).</p>
<p>BTW, if you see this same issue in BizTalk 2010, it&rsquo;s because you installed .NET 4.5 in your BizTalk 2010 environment &ndash; which is not tested or supported.&nbsp; You need to be on .NET 4.0 if you&rsquo;re running BTS2010.</p>
<p><strong>Update:</strong>&nbsp; BizTalk 2010 CU7 added support for .NET 4.5 so you should not see this issue once you are on CU7 - see Permanent Solution section for details.</p>
<h2><span style="font-size: large;"><strong>Workarounds</strong></span></h2>
<p>The first and easiest workaround is to do nothing.&nbsp; Note that this crash happens during periods of idleness/inactivity so your orchestrations aren&rsquo;t doing anything anyway.&nbsp; Also, Service Control Manager is configured to bring a BTS process up a minute after a crash so the process will come back up just fine and continue to process fine.&nbsp; The crash won&rsquo;t happen again until after there is orchestration activity and another period of idleness/inactivity occurs.</p>
<p>Note that if there are other things going on in the same host (like receive or send ports) then I wouldn&rsquo;t be comfortable letting the host crash since non-orchestration work within the same host could be impacted.&nbsp; In that case, you can separate out non-orchestration work into other hosts (that&rsquo;s generally recommended anyway) or you can go with the below workaround.&nbsp;</p>
<p>Another thing to consider is that, depending on the Windows Error Reporting (Dr. Watson) settings on the machine, these crashes can build up dump files on the drive.&nbsp; The default location for these would be C:\ProgramData\Microsoft\Windows\WER\ReportQueue.&nbsp; Check for any subfolders starting with "AppCrash_BTSNTSvc" - you can delete them if you don't need them.&nbsp; So if you have limited disk space on the system drive, that might also be a reason to go with the below workaround.&nbsp;</p>
<p>If allowing the host to crash during periods of orchestration idleness/inactivity is not an option, the workaround is to turn off XLANG AppDomain shutdown.&nbsp; This is generally safe to do.&nbsp; The only concern is if you have an orchestration that calls custom code that pins objects in memory to the appdomain (not good in general), then not tearing it down periodically could lead to excessive memory usage.&nbsp; Still, any 24x7 environment will never have appdomain shutdown happening anyway and I&rsquo;ve seen a number of environments that have very low latency requirements turn it off (since reloading XLANG engine after periods of inactivity is a perf hit to that first request).&nbsp;</p>
<p>So, to prevent the crash from happening altogether, here&rsquo;s what you do:</p>
<ol>
<li>Go to your BTS folder (default is C:\Program Files (x86)\Microsoft BizTalk Server 2013)</li>
<li>First, save a copy of the BTSNTSvc64.exe.config file with a new name since we need to modify the original.&nbsp; (BTSNTSvc.exe.config if it&rsquo;s a 32 bit host that is crashing &ndash; you can check the error message to see if the crash is happening to BTSNTSvc.exe or BTSNTSvc64.exe)</li>
<li>Open the original file in notepad and directly below the &lt;configuration&gt; node, add the following:<br />&nbsp;<br />&nbsp;&nbsp;&nbsp; <span style="color: #ff0000;">&lt;configSections&gt;</span><br /><span style="color: #ff0000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;section name="xlangs" type="Microsoft.XLANGs.BizTalk.CrossProcess.XmlSerializationConfigurationSectionHandler, Microsoft.XLANGs.BizTalk.CrossProcess" /&gt;</span><br /><span style="color: #ff0000;">&nbsp;&nbsp;&nbsp; &lt;/configSections&gt;</span><br />&nbsp;</li>
<li>Then, directly below the &lt;/runtime&gt; node, add the following:<br />&nbsp;<br />&nbsp;&nbsp;&nbsp; <span style="color: #ff0000;">&lt;xlangs&gt;</span><br /><span style="color: #ff0000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Configuration&gt;</span><br /><span style="color: #ff0000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;AppDomains AssembliesPerDomain="50"&gt;</span><br /><span style="color: #ff0000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;DefaultSpec SecondsIdleBeforeShutdown="-1" SecondsEmptyBeforeShutdown="-1"/&gt;</span><br /><span style="color: #ff0000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/AppDomains&gt;</span><br /><span style="color: #ff0000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/Configuration&gt;</span><br /><span style="color: #ff0000;">&nbsp;&nbsp;&nbsp; &lt;/xlangs&gt;</span><br />&nbsp;</li>
<li>Recycle the host</li>
</ol>
<p>&nbsp;</p>
<h2>Permanent Solution</h2>
<p>Microsoft has created fixes for this issue in BizTalk 2013 and 2010.</p>
<p><strong>BizTalk 2013:</strong></p>
<ul>
<li>Fix will be included in BizTalk 2013 Cumulative Update 3</li>
<li>The article at <a href="https://support.microsoft.com/kb/2555976">https://support.microsoft.com/kb/2555976</a> will be updated once 2013 CU3 is publicly released.</li>
<li>If you need this fix before 2013 CU3 is publicly released, please create a support case with Microsoft and request standalone fix 2909928.</li>
<li>2013 CU2 is a prereq for this standalone fix.&nbsp; Get CU2 from <a href="https://support.microsoft.com/en-us/kb/2555976">https://support.microsoft.com/en-us/kb/2555976</a>.</li>
<li>Please be sure to understand the information at <a href="https://support.microsoft.com/kb/2003907">https://support.microsoft.com/kb/2003907</a> before installing any BizTalk fix or CU.</li>
</ul>
<p><strong>BizTalk 2010:</strong></p>
<ul>
<li>Fix is available in BizTalk 2010 Cumulative Update 7</li>
<li>Get 2010 CU7 from <a href="https://support.microsoft.com/kb/3021712">https://support.microsoft.com/kb/3021712</a>.</li>
<li>This issue is officially documented at <a href="https://support.microsoft.com/en-us/kb/2909928">https://support.microsoft.com/en-us/kb/2909928</a>.</li>
<li>.NET 4.5 is not officially supported on 2010 without CU7.&nbsp; It is OK to install CU7 before or after installing .NET 4.5.</li>
<li>Please be sure to understand the information at <a href="https://support.microsoft.com/kb/2003907">https://support.microsoft.com/kb/2003907</a> before installing any BizTalk fix or CU.</li>
</ul>
<p>&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>Duplicate key row in object 'dbo.bts_LogShippingJobs'</title>
      <link>https://docs.microsoft.com/archive/blogs/biztalkcpr/duplicate-key-row-in-object-dbo-bts_logshippingjobs</link>
      <pubDate>Thu, 16 May 2013 11:10:43 GMT</pubDate>
      <dc:creator><![CDATA[Randy Ridgely]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/biztalkcpr/2013/05/16/duplicate-key-row-in-object-dbo-bts_logshippingjobs/</guid>
      <description><![CDATA[A customer was setting up Log Shipping disaster recovery for their BizTalk Server 2006 R2...]]></description>
      <content:encoded><![CDATA[<p>A customer was setting up Log Shipping disaster recovery for their BizTalk Server 2006 R2 environment. <a href="https://technet.microsoft.com/en-us/library/aa560961(v=bts.20).aspx">https://technet.microsoft.com/en-us/library/aa560961(v=bts.20).aspx</a>&nbsp; They had gotten to the step where they run the stored procedure bts_ConfigureBizTalkLogShipping. They received the error "Msg 2601, Level 14, State 1,&nbsp; Procedure bts_ImportSQLAgentJobs, Line 56 Cannot insert duplicate key row in object 'dbo.bts_LogShippingJobs' with unique index 'CIX_LogShippingJobs'."</p>
<p>It turns out that this customer also had several of their own SQL Agent jobs running on the BizTalk server. As part of configuring the destination environment, we attempt to recover all of the jobs running on the BizTalk server with one exception: we don&rsquo;t support importing of SQL Agent jobs where the steps use more than one database. The script's logic iterates over each database to be recovered and logs the jobs associated with that database in bts_LogShippingJobs for later recovery. If a job has more than one database association, the script attempts to log it twice. But we never want to recover the same job more than once, so bts_LogShippingJobs doesn't allow duplicate jobs. When the script attempts to log the job the second time, it fails.</p>
<p>In general, we discourage running any jobs on the SQL Server that supports BizTalk Server other than the jobs that ship with the product.</p>
<p>For those customers who choose to run their own jobs and encounter this issue, the solution is to temporarily remove any job(s) associated with multiple databases while setting up the destination recovery environment. You will also need to develop your own recovery plan for any such job(s). Once the destination environment is configured, you can restore the jobs. The following T-SQL will identify jobs associated with multiple databases:</p>
<p><code>SELECT j.name, COUNT(DISTINCT js.database_name) AS dbcount <br />INTO #tmp FROM msdb.dbo.sysjobsteps js <br />JOIN msdb.dbo.sysjobs j WITH (NOLOCK) <br />ON j.job_id = js.job_id <br />GROUP BY j.name <br />SELECT * FROM #tmp WHERE dbcount &gt; 1 <br />DROP TABLE #tmp </code></p>]]></content:encoded>
    </item>
    <item>
      <title>BizTalk EDI Leap Year Fix FAQ</title>
      <link>https://docs.microsoft.com/archive/blogs/biztalkcpr/biztalk-edi-leap-year-fix-faq</link>
      <pubDate>Fri, 24 Feb 2012 21:28:00 GMT</pubDate>
      <dc:creator><![CDATA[Shaheer Abubucker]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/biztalkcpr/2012/02/24/biztalk-edi-leap-year-fix-faq/</guid>
      <description><![CDATA[As you&nbsp; may have heard, there is an issue in the BizTalk 2006 R2 and 2009 EDI Engines that...]]></description>
      <content:encoded><![CDATA[<p>As you&nbsp; may have heard, there is an issue in the BizTalk 2006 R2 and 2009 EDI Engines that results in a failed EDI transaction if the EDI message contains a date node that has a leap year value - for example 2/29/2012.&nbsp; This issue and hotfix is documented at <a href="https://support.microsoft.com/kb/2435900">https://support.microsoft.com/kb/2435900</a>.&nbsp; With 2/29/2012 just days away, this is a big deal and you will want to address this issue in your environment ASAP.</p>
<p>You can also get some great information about this issue at <a href="https://blogs.msdn.com/b/biztalkcrt/archive/2012/02/22/edi-leap-year-hotfix-biztalk-2009-and-biztalk-2006-r2.aspx">https://blogs.msdn.com/b/biztalkcrt/archive/2012/02/22/edi-leap-year-hotfix-biztalk-2009-and-biztalk-2006-r2.aspx.</a></p>
<p>I've also compiled a list of questions that have been asked about this issue over the last week and created a detailed FAQ document about this.&nbsp; Check it out below.&nbsp;</p>
<p>Also, to download the pipeline sample mentioned in the FAQ, click <a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/96/90/5875.LY_Sample.zip" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-96-90/5875.LY_5F00_Sample.zip">here</a>.</p>
<p>(FAQ last updated on 02/29/2012 at 12:22PM Central Time)</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Components.PostAttachments/00/10/27/28/03/BTSLeapYearFAQ.docx" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-10-27-28-03/BTSLeapYearFAQ.docx">BTSLeapYearFAQ.docx</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Creating  partitioned View in the BAM Archiving Database</title>
      <link>https://docs.microsoft.com/archive/blogs/biztalkcpr/creating-partitioned-view-in-the-bam-archiving-database</link>
      <pubDate>Mon, 05 Dec 2011 13:33:30 GMT</pubDate>
      <dc:creator><![CDATA[Mike Shea1]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/biztalkcpr/2011/12/05/creating-partitioned-view-in-the-bam-archiving-database/</guid>
      <description><![CDATA[&#160;  Carl Nolan of the UK Solution Development Team wrote an excellent blog post on the above...]]></description>
      <content:encoded><![CDATA[<p>&#160;</p>  <p>Carl Nolan of the UK Solution Development Team wrote an excellent blog post on the above topic.&#160; He includes a script for creating partitioned views that can be used if modifications to the existing activity items are continuing to be made.</p>  <p><a href="https://blogs.msdn.com/b/mcsuksoldev/archive/2011/11/15/creating-a-partitioned-view-in-the-bam-archiving-database.aspx">https://blogs.msdn.com/b/mcsuksoldev/archive/2011/11/15/creating-a-partitioned-view-in-the-bam-archiving-database.aspx</a></p>]]></content:encoded>
    </item>
    <item>
      <title>When tuning messaging engine threads per cpu lower from defaults can help performance</title>
      <link>https://docs.microsoft.com/archive/blogs/biztalkcpr/when-tuning-messaging-engine-threads-per-cpu-lower-from-defaults-can-help-performance</link>
      <pubDate>Mon, 31 Oct 2011 07:13:21 GMT</pubDate>
      <dc:creator><![CDATA[Mike Shea1]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/biztalkcpr/2011/10/31/when-tuning-messaging-engine-threads-per-cpu-lower-from-defaults-can-help-performance/</guid>
      <description><![CDATA[&#160;  &#160;  Say you have a large flatfile in an application that does messaging...]]></description>
      <content:encoded><![CDATA[<p>&#160;</p>  <p>&#160;</p>  <p>Say you have a large flatfile in an application that does messaging only.&#160;&#160; You drop a single file and you notice elevated cpu for the receive host for several minutes.&#160;&#160;&#160; What’s happening in the host is that a single messaging thread is using the ffdasm to disassemble the flat file.&#160;&#160; This is a very cpu intensive activity</p>  <p>Now you drop 100 large flatfiles.&#160; Since messaging engine threads per cpu is set to 20, if you have a two processors, then there will be 40 messaging engine threads created and operating on 40 inbound flatfiles.&#160;&#160;&#160; cpu still goes to 100%, but it takes longer for the first flatfile to be processed because other threads are taking valuable cpu resources.&#160;&#160; </p>  <p>In testing on a two processor system I was able to get the best end to end performance by specifying that only one messaging engine thread per cpu be used on the receive host when performance testing with 100 files.&#160; Tuning messaging engine threads per cpu to a lower value results in faster processing of the first file through the system and additionally faster overall processing.</p>  <p>1 messaging engine thread per cpu on the receive host about 4 minutes to process the first file.&#160; 1 hour and 30 minutes for all files</p>  <p>10/21/2011&#160; 02:46 PM&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; set messaging engine threads to 1 for full test.txt</p>  <p>10/21/2011&#160; 02:50 PM&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 2,752,368 {FC0AD608-1F76-43A2-B7D5-44DDB66E66DF}.xml</p>  <p>10/21/2011&#160; 04:16 PM&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 2,752,368 {F7241E83-C7F1-428D-A5DD-2582CF8ABE20}.xml</p>  <p>&#160;</p>  <p>2 messaging engine threads per cpu on the receive host about 4 minutes to process the first file.&#160; 1 hour 42 minutes to finish all approx..</p>  <p>10/19/2011&#160; 04:29 PM&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; set messaging engine threads to 2 for full test.txt</p>  <p>10/19/2011&#160; 04:33 PM&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 2,752,368 {C29DB82A-98E8-4B41-B917-093DDC708D21}.xml</p>  <p>10/19/2011&#160; 05:02 PM&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 2,752,368 {E9AFFEC2-B60B-446C-9D63-1BBBB2B2FD12}.xml&#160; 33<sup>rd</sup> file in 34 minutes.&#160; Had to stop test early summary </p>  <p>extrapolated.</p>  <p>&#160;</p>  <p>4 messaging engine threads per cpu on the receive host&#160; 10 minutes time to first message and 1 hour and 39 minutes total processing time.</p>  <p>10/19/2011&#160; 06:06 PM&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; set messaging engine threads to 4 for full test.txt</p>  <p>10/19/2011&#160; 06:16 PM&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 2,752,368 {E96CD77C-8D24-4BB9-A111-871594B06F3F}.xml</p>  <p>10/19/2011&#160; 07:45 PM&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 2,752,368 {2F2EE1F9-C9F0-44A9-B2D1-1A02BC9F7EAD}.xml</p>  <p>&#160;</p>  <p>20 messaging engine threads per cpu on the receive host (the default setting) 18 minutes.&#160; 1 hour and 42 minutes for all files to be processed.</p>  <p>10/20/2011&#160; 09:35 AM&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; set messaging engine threads to 20 for full test.txt</p>  <p>10/20/2011&#160; 09:53 AM&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 2,752,368 {9BA6A42F-A634-4FEF-A29E-F16A774D823F}.xml</p>  <p>10/20/2011&#160; 11:17 AM&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 2,752,368 {262F3035-CACF-423A-BDFA-5EA817D2639B}.xml</p>  <p>&#160;</p>  <p>50 messaging engine threads per cpu on the receive host&#160; 23 minutes before first file is processed.&#160; 1 hour 54 minutes for all files to be processed.</p>  <p>10/20/2011&#160; 02:56 PM&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; set messaging engine threads to 50 for full test.txt</p>  <p>10/20/2011&#160; 03:19 PM&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 2,752,368 {40BF75AF-3935-4DC1-99C4-048CD61421D1}.xml<b> </b></p>  <p>10/20/2011&#160; 04:50 PM&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 2,752,368 {5B72CC56-FB61-4A33-9186-3A3F954AC38A}.xml</p>]]></content:encoded>
    </item>
    <item>
      <title>BizTalk Terminator Not Cleaning Up Caching Items?</title>
      <link>https://docs.microsoft.com/archive/blogs/biztalkcpr/biztalk-terminator-not-cleaning-up-caching-items</link>
      <pubDate>Wed, 24 Aug 2011 13:06:00 GMT</pubDate>
      <dc:creator><![CDATA[Shaheer Abubucker]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/biztalkcpr/2011/08/24/biztalk-terminator-not-cleaning-up-caching-items/</guid>
      <description><![CDATA[&nbsp;



UPDATE:&nbsp; See BizTalk Terminator STILL Not Cleaning Up Caching Items for...]]></description>
      <content:encoded><![CDATA[<p>&nbsp;</p>
<table border="1" cellpadding="5" align="left">
<tbody>
<tr>
<td><span style="font-size: small;"><strong>UPDATE:&nbsp; </strong>See <a href="https://blogs.msdn.com/b/biztalkcpr/archive/2015/06/29/biztalk-terminator-still-not-cleaning-up-caching-items.aspx">BizTalk Terminator <em>STILL</em> Not Cleaning Up Caching Items</a> for additional info on this plus a new cache cleanup task that can simplify all of this.</span></td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p><br />I've been pinged a number of times on this so thought I should blog the workaround and an explanation.&nbsp;</p>
<p>First, let's say MBV shows you something like the following in the Warning and Summary Report:</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/96/90/6305.mbv1.JPG" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-96-90/6305.mbv1.JPG"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/96/90/6305.mbv1.JPG" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-96-90/6305.mbv1.JPG" alt="" border="0" /></a></p>
<p>Or you just notice in MBV that there's a bunch of cache messages in one of the queue tables:</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/96/90/0447.mbv2.JPG" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-96-90/0447.mbv2.JPG"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/96/90/0447.mbv2.JPG" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-96-90/0447.mbv2.JPG" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p>Well, according to my <a title="Using BizTalk Terminator to resolve issues identified by BizTalk MsgBoxViewer and the BizTalk 2010 Monitor BizTalk Server Job" href="https://blogs.msdn.com/biztalkcpr/pages/using-biztalk-terminator-to-resolve-issues-identified-by-biztalk-msgboxviewer.aspx" target="_blank">Using BizTalk Terminator to Resolve Issues</a> article, you simply run the <em>Terminate Caching Instances</em> task:&nbsp;</p>
<table border="2" cellspacing="0" cellpadding="3">
<tbody>
<tr>
<td valign="top">
<p><strong>Issue Identified by MBV </strong></p>
</td>
<td valign="top">
<p><strong>Resolution Options</strong></p>
</td>
<td valign="top">
<p><strong>Terminator Resolution Task</strong></p>
</td>
<td valign="top">
<p><strong>Terminator View Task </strong></p>
</td>
<td valign="top">
<p><strong>Root Cause</strong></p>
</td>
</tr>
<tr>
<td valign="top">
<p><a href="https://blogs.msdn.com/biztalkcpr/pages/using-biztalk-terminator-to-resolve-issues-identified-by-biztalk-msgboxviewer.aspx#Cache">Orphaned Cache Instances</a></p>
</td>
<td valign="top">
<p>MBV Integration or Manual Task Selection</p>
</td>
<td valign="top">
<p><span style="background-color: #ffff00;">Terminate Caching Instances</span></p>
<p><span style="background-color: #ffff00;">(in Delete task category)</span></p>
</td>
<td valign="top">
<p>View Count of Cache Messages in All Host Queues</p>
<p>View Count of Cache Instances in All Hosts</p>
</td>
<td valign="top">
<p>This is due to a known bug and there is a hotfix available.&nbsp; See KBs 944426 &amp; 936536 for details.</p>
</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>That should do it.&nbsp; If it doesn't, make sure you have stopped all the BizTalk hosts (that includes the IIS app pool hosting the BizTalk isolated host if the caching items are there) and try again.&nbsp; (Hey, you shouldn't be running Terminator without stopping all the BTS hosts anyway).</p>
<p>Now, <em>that</em> will definitely do it.</p>
<p>Well...&nbsp;like 99.9% of the time.</p>
<p>Let's say you do all of the above and then run one of those View tasks (or MBV)&nbsp; and notice that Terminator left behind some of those caching instances (and their associated caching messages).&nbsp; This happens even though Terminator claims to have terminated all of them successfully.&nbsp; And rerunning the task doesn't help - Terminator will repeatedly say it successfully terminated those instances but either of the View tasks will show that they're still there.</p>
<p>Ok, so now you're most likely running into a very rare scenario that I've come across a few times.&nbsp;</p>
<p>First,&nbsp;I should point out that the <em>Terminate Caching Instances</em> and <em>Terminate Instances</em> tasks use BizTalk's WMI API to interact with the messagebox - and that's key.&nbsp; I had the opportunity to analyze some data from a customer environment that was running into this issue and it turns out&nbsp;that there are certain times when msgbox logic prevents the stored procs called by WMI from terminating &ldquo;internal&rdquo; instances &ndash; with caching being considered one of those "internal" types.&nbsp; As far as when exactly the msgbox logic goes down this "rare" path, I've never had access to&nbsp;a repro environment where I could fully debug this so I don't have a good answer for that.</p>
<p>So&nbsp;I was going to write code in Terminator's WMI class&nbsp;to catch this scenario and warn the user that they need to use the workaround to clean up the remaining items but unfortunately the msgbox logic catches the failed call and doesn&rsquo;t pass that info on to the WMI caller &ndash; so there&rsquo;s no way for Terminator (or any WMI client) to know that some of the instances weren&rsquo;t deleted.&nbsp; As far as the WMI client is concerned, the stored proc call completed sucessfully so it assumes the instances it asked to be Terminated were actually terminated.</p>
<p>So what's the workaround?&nbsp; Well, don't use WMI for this particular situation.&nbsp; Instead, use Terminator's Hard Termination tasks (<em>Terminate Multiple Instances (Hard Termination) </em>or<em> <em>Terminate Single Instance (Hard Termination).</em></em></p>
<p>While I was working on Terminator's WMI class and having BizTalk engineers use Terminator on an internal-only basis within Microsoft, we noticed that on very rare occasions the termination tasks would not terminate something.&nbsp; This would not be a limitation of Terminator and we could reproduce it with any WMI client (including the BTS Admin console).&nbsp; I created the hard termination tasks specifically to handle those scenarios.&nbsp; They bypass BizTalk's normal termination API and use SQL calls to directly interact with the BizTalk msgbox.&nbsp; They can terminate anything (well, so far)&nbsp;- even internal instances.&nbsp; Originally, we just had the <em>Terminate Single Instance (Hard Termination) </em>task to help terminate a one-off instance that just wouldn't terminate any other way.&nbsp;&nbsp;That worked great for those one-off scenarios but I soon realized that sometimes there would be a larger number of instances that needed hard termination.&nbsp; I left the single instance task to give users that functionality and wrote the <em>Terminate Multiple Instances (Hard Termination) </em>task.&nbsp; That allows the user to choose the Host, Class, Status, and the Max number of instances to terminate and will do hard terminates on all items that fit the filter criteria.&nbsp;</p>
<p>The only thing that is painful about the <em>Terminate Multiple Instances (Hard Termination) </em>task is that if you have instances across multiple hosts with various statuses, you will need to run the task for each permutation since it doesn't have the ability to handle, in one execution, multiple hosts and statuses (or classes) like the WMI-based&nbsp;<em>Terminate Instances</em> and <em>Terminate Caching Instances</em> tasks.&nbsp; Since Terminator v2 supports Powershell, I'm hoping at some point to create a powershell-based hard terminate task that can provide this functionality - just haven't had the time to do that yet.</p>
<p>&nbsp;&nbsp;</p>
<p><span style="font-size: medium;">So, in short:</span></p>
<p><span style="font-size: medium;"><strong>Problem:</strong></span></p>
<p><span style="font-size: medium;">The <em>Terminate Caching Instances</em> task is not cleaning up all cache items.</span></p>
<p><span style="font-size: medium;"><strong>Solution:</strong></span></p>
<p><span style="font-size: medium;">Use the&nbsp;<em>Terminate Multiple Instances (Hard Termination)</em> task,&nbsp;choose Caching as the Class Parameter.&nbsp;</span></p>
<p><span style="font-size: medium;">You will need to re-run this task for each Host and Status that applies to the cache items you're trying to terminate - MBV or the Terminator View Count of Cache tasks should give you some info in this regard.&nbsp;</span></p>
<p><span style="font-size: medium;">BTW, I've seen active, dehydrated, and suspended cache items so you may need to cycle through all of those Statuses.</span></p>
<p>&nbsp;</p>
<p><span style="font-size: medium;">In general, if you ever find that any of the termination tasks are not terminating what you want, the two Hard Termination tasks (Single and Multiple) are the workaround.&nbsp;</span></p>
<p>&nbsp;</p>
<p><span style="font-size: medium;"><strong>Remember that Hard Termination tasks bypass the normal BTS APIs so should only be used if the normal <em>Terminate Instances</em> or <em>Terminate Caching Instances</em> task is not working - and as always, be careful with Terminator - especially when doing any of the deletion tasks.</strong></span></p>
<p>&nbsp;</p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
  </channel>
</rss>