If you are using batches for EDI in BizTalk Server 2009 and earlier you might experience problems with deployment if you include your parties in your binding files or have a role link that have enlisted the party. If it is the later part you will always run into problems as you binding always includes parties even if you don’t select it in your deployment.

The normal way to deploy would go into each party and stop the batch as this will stop the orchestration that always is running. You can see your running orchestrations in the BizTalk hub where it is possible to see which parties that have a batch running.

Well I ran into a case where it wasn’t possible to see the batches in the BizTalk hub. Maybe someone terminated the orchestrations. And I had about 20 parties and with the slow BizTalk administration tool in BizTalk Server 2009 I wanted to find another way to find out which parties were blocking my deployment.

As always there is the SQL way to find the information. What you want to look at is the output from this SQL:

SELECT TOP 1000 [PartyId]
      ,[BatchOrchestrationId]
      ,[NumOccurences]
      ,[BatchId]
  FROM
[BizTalkMgmtDb].[dbo].[PAM_Batching_Log]

This gave my the following output:

And with the following SQL I could find the Party that was blocking by deployment:
SELECT TOP 1000 [nID]
      ,[nvcName]
      ,[nvcSignatureCert]
      ,[nvcSignatureCertHash]
      ,[nvcSID]
      ,[nvcCustomData]
      ,[DateModified]
  FROM
[BizTalkMgmtDb].[dbo].[bts_party]

With that information I could find the party in BizTalk and stop the batch. Some day I am going to find a way to start and stop edi batches automatically during deployment…