Wednesday, May 21, 2008

Still about the same problem

First, some interesting info:
What is message Tracking
Now lets return to the problem.
As you can see from my last post I had some problems with the index IX_TrackingMessageReferences (that exists on table TrackingMessageReferences lacated on db BiztalkMsgBoxDb).
I already posted the solution, but again as you can read on last post I had also a problem with HAT not saving messages anymore. First I thought this problem were related to the index, then after re-configuring BTS I thought it wasn't. Well the HAT after a while stopped working (actualy it stop working since the 3rd time I had a problem with the index of table TrackingMessageReferences ). After some research I found this (really useful post):
The solution if anyone else is looking for: in our case was that there were
bunch of rows in TrackingMsgReferences table which could not be joined in to
the spool table (sproc which gets called when this TrackedMsgs_Copy_BizTalk
gets called has a sql statement which joins these two tables above). Since
this job selects top 50 always it was never able to run (we had more than 50
non refd rows).

Once the rows were deleted, join was happy, sproc and the jobs were able to
run.

Spool table is coming down in the number of rows too.

I only had to delete all entries from TrackingMsgReferences and I was back on track.

Remarks:
The SQL Server Agent service must be running on all MessageBox databases. The TrackedMessages_Copy_ job makes message bodies available to HAT and WMI. To efficiently copy the message bodies, they remain in the MessageBox database and are periodically copied to the BizTalk Tracking (BizTalkDTADb) database by the TrackedMessages_Copy_ job. Having the SQL Server Agent service running is also a prerequisite for the archiving and purging process to work correctly.

Short and simple:
My problem was TrackedMessages_Copy_ job wasn't running because an error was occouring.
To correct the error I had to delete all entries from TrackingMsgReferences table (on BiztalkMsgBoxDb database).

23-May-2008 (Update):
Today I lost the hability of saving messages from HAT again, after trying to run the
TrackedMessages_Copy_ job I found it was getting error again, this time because of index ix_tracking_parts1 (not in DB BiztalkMessageBoxDb but in the BizTalkDTADb.Tracking_Parts1). I had to use the first solution I mentioned in my last post. I had to select "Ignore duplicated entries" and re-run the TrackedMessages_Copy_ job.