BizTalk Server: Monitor BizTalk Server Job

BizTalk Server: Monitor BizTalk Server Job


Introduction

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.

Monitor BizTalk Server Job


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] and [btsmon_Issues]. 


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 Job History.


Figure 4. Monitor BizTalk Server Job History (click to enlarge).

Custom View


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:

CREATE VIEW [dbo].[bts_Monitor_Job_Issues]
AS
SELECT Inconsistancy.DBServer AS [Server Name], Inconsistancy.DBName AS [Database Name], Inconsistancy.nProblemCode AS [Problem Code], Issue.nvcProblemDescription AS [Description] FROM btsmon_Inconsistancies Inconsistancy INNER JOIN [dbo].[btsmon_Issues] Issue ON Inconsistancy.nProblemCode = Issue.nProblemCode
WHERE Inconsistancy.nCount > 0
GO

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.

Considerations


There are a few things to consider when running this job:
  • According to the Microsoft documentation this job is computational intensive and therefor scheduled once a week by default. Microsoft recommends to run this job during low traffic or downtime.
  • As stated in the previous point the job is scheduled once a week by default. You can however consider to run the job more often. Once a day during low traffic.
  • The job will not detect if issues have already been reported. When the job is run a subsequent time and the issues have not been fixed they will be reported again.
  • The job will only detect issue but not fix them. You should configure an alert or notification on the job in case the job fails due to errors.
  • In case you run into issues with the job you might need to apply a cumulative update, see for instance kb2452550.

Resolving detected issues

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: BizTalk Terminator.

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!


See Also

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


Leave a Comment
  • Please add 6 and 8 and type the answer here:
  • Post
Wiki - Revision Comment List(Revision Comment)
Sort by: Published Date | Most Recent | Most Useful
Comments
  • Maheshkumar S Tiwari edited Revision 15. Comment: minor edit

  • Tord G.Nordahl edited Revision 11. Comment: just changed one line that didn't really make sense.. :) Great article Steef-Jan!

  • Steef-Jan Wiggers edited Revision 10. Comment: Added consideration

  • Steef-Jan Wiggers edited Revision 9. Comment: Added text

  • Steef-Jan Wiggers edited Revision 8. Comment: Added table

  • Maheshkumar S Tiwari edited Revision 6. Comment: corrected typo error and minor edit

  • Steef-Jan Wiggers edited Revision 7. Comment: I am not finished with the article yet and it is extremely annoying when someone budges in to alter it!

  • Steef-Jan Wiggers edited Revision 5. Comment: Added a figure

  • Steef-Jan Wiggers edited Revision 3. Comment: Added resource link

  • Steef-Jan Wiggers edited Revision 2. Comment: Added text to see also

Page 1 of 2 (12 items) 12
Wikis - Comment List
Sort by: Published Date | Most Recent | Most Useful
Posting comments is temporarily disabled until 10:00am PST on Saturday, December 14th. Thank you for your patience.
Comments
  • Steef-Jan Wiggers edited Original. Comment: Added text to pictures

  • Steef-Jan Wiggers edited Revision 1. Comment: Added text

  • Steef-Jan Wiggers edited Revision 2. Comment: Added text to see also

  • Steef-Jan Wiggers edited Revision 3. Comment: Added resource link

  • Steef-Jan Wiggers edited Revision 5. Comment: Added a figure

  • Maheshkumar S Tiwari edited Revision 6. Comment: corrected typo error and minor edit

  • Steef-Jan Wiggers edited Revision 7. Comment: I am not finished with the article yet and it is extremely annoying when someone budges in to alter it!

  • Steef-Jan Wiggers edited Revision 8. Comment: Added table

  • Steef-Jan Wiggers edited Revision 9. Comment: Added text

  • Steef-Jan Wiggers edited Revision 10. Comment: Added consideration

  • Excelent article!

  • Tord G.Nordahl edited Revision 11. Comment: just changed one line that didn't really make sense.. :) Great article Steef-Jan!

  • Maheshkumar S Tiwari edited Revision 15. Comment: minor edit

  • One more nice article!!!!!!!!

Page 1 of 1 (14 items)