A new feature in BizTalk Server 2010 is a new SQL job called Monitor BizTalk Server. This job and other database jobs are created when you configure a BizTalk group.
Figure 1. BizTalk Server Database Jobs visible under SQL Server Agent Jobs.
The Monitor BizTalk Server job scans for issues, but does not fix them for you! It consist of two steps. First step is the execution of the [btsmon_Inconsistancies] stored-procedure. This procedure will on its turn call other procedures in the MessageBox,
Management and Tracking database to collect error data (like messages without references). The second step is calling the procedure [btsmon_GenerateErrorString] in Management database, which involves a query of two tables [btsmon_Inconsistancies]
Figure 2. Job Properties of Monitor BizTalk Server Job - Steps.
When you query the table [btsmon_Issues] of BizTalk Management Database (BizTalkMgmtDb) you will see the description of the issues that can be detected:
Figure 3. Job Properties of Monitor BizTalk Server Job - Steps.
If job encounters any issues if will fail and return a string containing number of issues found (i.e. result of second step). This string will by default be logged to the event viewer and is also visible in the
Figure 4. Monitor BizTalk Server Job History (click to enlarge).
Although this job does not fix any issues you can leverage this job by creating a monitoring solution or altering mechanism for administrators so they can act on any issues at hand. This does mean customizations on your part. Either by leveraging the alert
or notification capabilities of SQL Server Jobs or by for instance creating a view that shows any issues. You can create a custom view using the following TSQL code:
[Problem Code], Issue.nvcProblemDescription
Inconsistancy.nProblemCode = Issue.nProblemCode
Inconsistancy.nCount > 0
This view will show any issues resulting from the execution of the Monitor BizTalk Server Job.
Figure 5. Result from executing query on the custom view.
There are a few things to consider when running this job:
In case issues are detected by the Monitor BizTalk Server Job you will need to take action to resolve them. The BizTalk terminator tool can aid you in resolving any of the issues detected by this job. See the blog post created by One Blog for BizTalk Engineers:
Using BizTalk Terminator to resolve issues identified by BizTalk MsgBoxViewer and the BizTalk 2010 Monitor BizTalk Server Job. The terminator tool can be obtained through the Microsoft Download Center:
Note: When using the terminator tool. Backup BizTalk Databases Stop all host instances and Stop SQL Agent. Read the full description of each task before running it!
Read related topics:
Another important place to find a huge amount of BizTalk related articles is the TechNet Wiki itself. The best entry point is
BizTalk Server Resources on the TechNet Wiki