Management Console Timing Out

 Uncategorized  Comments Off on Management Console Timing Out
Apr 262012
 

Have you ever needed to query through the BizTalk Management Console and find some messages that are tracked, but the console keeps timing out?

Here is a query that you can run:

use [BizTalkDTADb] GO set DEADLOCK_PRIORITY LOW SELECT TOP 1000 ms.strStatus AS [Event Type], svcs.strServiceName AS [Service Name], tr.strAdapter AS [Adapter], mioe.strUrl AS [URI], sn.strSchemaName AS [Schema Name], po.strPortName AS [Port Name], DATEADD(MI, DATEDIFF(MI,GETUTCDATE(),GETDATE()), mioe.dtTimestamp) AS [Timestamp], mioe.nPartCount AS [Part Count], mioe.nMessageSize AS [Size], ds.strDecryptionSubject AS [Decryption Certificate], ss.strSigningSubject AS [Signature], pn.strPartyName AS [Party Name], mioe.uidActivityId AS [Activity ID], mioe.uidMessageInstanceId AS [Message Instance ID], mioe.uidServiceInstanceId AS [Service Instance ID], si.uidServiceClassId AS [Service Class ID], svcs.strServiceType AS [Service Class] FROM dta_SchemaName sn JOIN [dbo].[dta_MessageInOutEvents] mioe ON mioe.nSchemaId = sn.nSchemaId LEFT JOIN [dbo].[dta_Adapter] tr ON tr.nAdapterId = mioe.nAdapterId LEFT JOIN [dbo].[dta_MessageStatus] ms ON mioe.nStatus = ms.nMessageStatusId LEFT JOIN [dbo].[dta_DecryptionSubject] ds ON ds.nDecryptionSubjectId = mioe.nDecryptionSubjectId LEFT JOIN [dbo].[dta_SigningSubject] ss ON ss.nSigningSubjectId = mioe.nSigningSubjectId LEFT JOIN [dbo].[dta_PartyName] pn ON pn.nPartyId = mioe.nPartyId LEFT JOIN [dbo].[dta_ServiceInstances] si ON mioe.uidServiceInstanceId = si.uidServiceInstanceId AND mioe.uidActivityId = si.uidActivityId LEFT JOIN [dbo].[dta_Services] svcs ON si.uidServiceId = svcs.uidServiceId LEFT JOIN [dbo].[dta_PortName] po ON po.nPortId = mioe.nPortId --Put the port name that you want to look at here: WHERE CAST(po.strPortName AS nvarchar(4000)) = 'Meditech Port' ORDER BY mioe.dtTimestamp DESC

Did I tell you that you should not be doing this? YOU SHOULDN’T!!!!!

Executing a dynamic query from multiple tables

 Uncategorized  Comments Off on Executing a dynamic query from multiple tables
Apr 242012
 

How do you query BAMArchive data? The tables that are created are time stamped.
A friend asked me about this, so I thought I would put a little example out there for everyone to see.
With the BAMarchive, all of the columns are the same (for a particular activity), so all I really need to do is UNION ALL the data.
(Oh this query has to be run against the database that the tables live)

use BAMArchive GO --Create all of the tables create table Table_1 (data nvarchar(100)) GO create table Table_2 (data nvarchar(100)) GO create table Table_3 (data nvarchar(100)) GO create table Table_4 (data nvarchar(100)) GO --Insert some data into each table insert into Table_1 select 'data for table 1' insert into Table_2 select 'data for table 2' insert into Table_3 select 'data for table 3' insert into Table_4 select 'data fro table 4' --Here is the actual work declare @statement nvarchar(max) set @statement='' select @statement=@statement+'select data from '+ name +' union all ' from sys.tables --Only get the tables that were created within the past day --but here you would want to include the activity name where create_date > dateadd(d,-1,GETDATE()) --Remove the last union all set @statement=substring(@statement,0,len(@statement)-9) --Show the query we are about to run select @statement [Query] --Actually run the statement exec (@statement) --dropping tables so you can run the query again drop table Table_1 GO drop table Table_2 GO drop table Table_3 GO drop table Table_4 GO

What happened when the BRE fired in BizTalk?

 Uncategorized  Comments Off on What happened when the BRE fired in BizTalk?
Apr 182012
 

I am writing this as a personal reminder on how to watch a BRE rule fire in BizTalk.

In the management console, price go to the application you are working in and right click the policies and in the window click refresh.

Right click and and add and choose the policies you want to track.

Here are the various policies that I have been debugging:

image

(Yes, look I know, I can set the endpoint configuration correctly on the first try (see my hints page), but I can’t determine the map to call to save my life!)

Restart the Host Instances

Run the process though and look at the Tracked Service Instances,  right click on the Message Flow

image

Click on the Follow this link to view the Policy execution details for this Orchestration Instance.

image

Voilà

Using Visual Studio to debug XSL

 Uncategorized  Comments Off on Using Visual Studio to debug XSL
Apr 182012
 

So I was attempting to debug an XSL stylesheet and every time I attempted to debug it, pharm I would continually get the following error:

Visual Studio encountered an error and will restart.

I looked high and low, to no avail.

The solution(s) are (one or the other)

  • Disable Visual Studio 2010 Power Tools
  • Move the xsl into a c# project instead of a BizTalk project