BizTalk Tips & Things

Agustin Mantaras BizTalk Blog

Integrating MessageBox Viewer and Terminator Tool

 

The MessageBox viewer tool (MBV) will warn about database issues If your BizTalk environment is having them. To fix this problems It can be cumbersome to know which queries you should run in Terminator tool.

As part of the output, The MBV will create an XML file named MBVCleanupScripts.XML. It contains all the actions you will need to run for keeping your environment without database issues.

For Instance, in my environment I am getting the following MBV Warnings:

image

image

image

image

In this case, the MBV generated the follwing MBVCleanUpScripts file:

 

<?xml version="1.0" encoding="UTF8"?>

<CCleanupScriptMgmt xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchemainstance">

<ProposedCleanupScript>

<Description>Script to cleanup DTA orphaned Msgs</Description>

<ID>CLEANUPSCRIPT_DTAORPH</ID>

<SvcOrMsgInstCount>97500</SvcOrMsgInstCount>

<Database>

<DBServer>AgusBTS2013R2</DBServer>

<DBName>BizTalkDTADb</DBName>

</Database>

</ProposedCleanupScript>

<ProposedCleanupScript>

<Description>Script to purge MarkLog Table</Description>

<ID>CleanUpMarkLog</ID>

<SvcOrMsgInstCount>218625</SvcOrMsgInstCount>

<Database>

<DBServer>AgusBTS2013R2</DBServer>

<DBName>BizTalkDTADb</DBName>

</Database>

<Database>

<DBServer>AgusBTS2013R2</DBServer>

<DBName>BizTalkMsgBoxDb</DBName>

</Database>

</ProposedCleanupScript>

<ProposedCleanupScript>

<Description>Script to cleanup Misc msg without owning Instance</Description>

<ID>CleanUpOrphanedMessagesForLostInstanceInAllHosts</ID>

<SvcOrMsgInstCount>1</SvcOrMsgInstCount>

<Database>

<DBServer>AgusBTS2013R2</DBServer>

<DBName>BizTalkMsgBoxDb</DBName>

</Database>

</ProposedCleanupScript>

<ProposedCleanupScript>

<Description>Script to rebuild ref counts</Description>

<ID>REPAIRPSCRIPT_REBUILDREFCOUNT</ID>

<SvcOrMsgInstCount>0</SvcOrMsgInstCount>

<Database>

<DBServer>AgusBTS2013R2</DBServer>

<DBName>BizTalkMsgBoxDb</DBName>

</Database>

</ProposedCleanupScript>

<ProposedCleanupScript>

<Description>Script to cleanup DTA orphaned ServiceInstanceExceptions</Description>

<ID>CleanUpOrphaneddta_ServiceInstanceExceptions</ID>

<SvcOrMsgInstCount>7675</SvcOrMsgInstCount>

<Database>

<DBServer>AgusBTS2013R2</DBServer>

<DBName>BizTalkDTADb</DBName>

</Database>

</ProposedCleanupScript>

</CCleanupScriptMgmt>

 

Importing the MBVCleanUpScripts File in Terminator Tool

 

  1. Now, Go to Terminator tool, fulfill and Check all the data.

    image

  2. Click Connect
  3. Click Import MBV and select the MBV file (MBVCleanUpScripts). It will be located in the same folder than the MBV report.
  4. Once the import is done, in my case I have the following options to run.
    (same options than issues reported by MBV)

    image

 

  1. Run one by one, and you will have your environment out of database issues.