The only thing is that you have to start every batching from the EDI agreement party configuration. And that can be frustrating…. Especially when you have some 20 batches to be started for a release. So I created a script to do just this. Start all batching for all agreements that have batching. And here it is:

I had this error when starting a batch from an agreement from the BizTalk admin console. (Batching of outgoing EDI messages is supported in BizTalk. Here is a good example how to use the BizTalk batching) There were 2 things you can try for this.

Let the SQL sysadmin try to start the batches

Try to import the parties again.

Very strange but when the parties were imported again, I could start the batching.

This is the complete error:

TITLE: BizTalk Server Administration
------------------------------
Exception has been thrown by the target of an invocation. (Microsoft.ManagementConsole)
------------------------------
ADDITIONAL INFORMATION:
Batch Id 27 not found. Check if batch and party exist. (Microsoft.BizTalk.Edi.Shared)

This error occurred on the production environment of a customer when using a view and the wcf-custom adapter with sql-binding.

&lt;ns0:NACK Type="NACK" xmlns:ns0="http://schema.microsoft.com/BizTalk/2003/NACKMessage.xsd"&gt;
&lt;NAckID&gt;{D3B42630-4221-4B76-9E55-9B148D4A8C7B}&lt;/NAckID&gt;
&lt;ErrorCode&gt;0xc0c0167a&lt;/ErrorCode&gt;
&lt;ErrorCategory&gt;0&lt;/ErrorCategory&gt;
&lt;ErrorDescription&gt;Microsoft.ServiceModel.Channels.Common.XmlReaderGenerationException: The columns A and B are either duplicated or not in a sequence. Each column can only be selected one time, and columns must be selected in sequence.
at Microsoft.Adapters.Sql.SelectBodyWriter.OnWriteBodyContents(XmlDictionaryWriter writer)
at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfMarshaller.CreateBizTalkMessageStream(Message wcfMessage, IAdapterConfigInboundMessageMarshalling config, TLConfig tlConfig, RLConfig rlConfig)
at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfMarshaller.CreateBizTalkMessage(IBaseMessageFactory messageFactory, IAdapterConfigInboundMessageMarshalling marshallingConfig, Message wcfMessage, TLConfig tlConfig, RLConfig rlConfig)
at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.RequestCallback(IAsyncResult result)&lt;/ErrorDescription&gt;
&lt;/ns0:NACK&gt;

The first solution after googling was to define the columns in the request xml so the order is explicit as stated in Sandro’s blog. This resulted in the same error. Connecting the staging environment to the production server gave no errors, and connecting BizTalk production to the staging database again gave the same error.

After some digging we noticed that the CU1 was installed on all environments except…… the production… After installing there were no more problems with the column order. So if you encounter this problem check if the CU is installed correctly.