The specified named connection is either not found in the configuration, not intended to be used with the EntityClient provider, or not valid

Hi, I was debugging some project and got this error while executing. I added the connectiong string in the machine.config and still getting this error….. The fix was restarting Visual Studio….. Somehow it is cached in vs..

 

Starting all EDI batches

When you are using the EDI batching functionality for outgoing messages in the BizTalk platform, it can be an effort to start all the batching for an environment.

The batching is located in the BizTalk EDI Application:

This is included with the BizTalk server installation as an extra option. The application consist of 4 orchestrations and receive and send locations:

With this you need to configure the batching on the agreement in the party configuration. Here are a few links how to do just that:

Batching Outgoing EDI Messages
BizTalk 2010 EDI Batching Tutorial
All you need to know about Outbound EDI Batching

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:


DECLARE @BatchIdNew BigInt,
@BatchName nvarchar (256),
@ReceiverPartyName nvarchar (256),
@SenderPartyName nvarchar (256),
@AgreementName nvarchar (256);

DECLARE c CURSOR FOR
SELECT Id, Name,
(SELECT [Name] FROM [tpm].[Partner] WHERE [PartnerId]=(SELECT [PartnerId] FROM [tpm].[BusinessProfile] WHERE [ProfileId]=(SELECT [ProfileId] FROM [tpm].[BusinessIdentity] WHERE Id=(SELECT [ReceiverId] FROM [tpm].[OnewayAgreement] WHERE Id=BatchDescription.[OnewayAgreementId])))) AS ReceiverName,
(SELECT [Name] FROM [tpm].[Partner] WHERE [PartnerId]=(SELECT [PartnerId] FROM [tpm].[BusinessProfile] WHERE [ProfileId]=(SELECT [ProfileId] FROM [tpm].[BusinessIdentity] WHERE Id=(SELECT [SenderId] FROM [tpm].[OnewayAgreement] WHERE Id=BatchDescription.[OnewayAgreementId])))) AS SenderName,
(SELECT [Name] FROM [tpm].[Agreement] WHERE [SenderOnewayAgreementId]=BatchDescription.[OnewayAgreementId]) AS AgreementName
FROM [BizTalkMgmtDb].[tpm].BatchDescription
OPEN c;
FETCH NEXT FROM c into @BatchIdNew, @BatchName, @ReceiverPartyName, @SenderPartyName, @AgreementName;

WHILE @@FETCH_STATUS = 0
BEGIN

EXEC [BizTalkMgmtDb].dbo.edi_CreateControlMessage_Activate @BatchId=@BatchIdNew,@EdiMessageType=1,
@BatchName=@BatchName,@ReceiverPartyName=@ReceiverPartyName,@SenderPartyName=@SenderPartyName,@AgreementName=@AgreementName
FETCH NEXT FROM c into @BatchIdNew, @BatchName, @ReceiverPartyName, @SenderPartyName, @AgreementName;

END

You will run this on the management database of BizTalk, and all your batching will be started. Good luck!

Get size of all tables in database

Note:

SELECT 
    t.NAME AS TableName,
    s.Name AS SchemaName,
    p.rows AS RowCounts,
    SUM(a.total_pages) * 8 AS TotalSpaceKB, 
    SUM(a.used_pages) * 8 AS UsedSpaceKB, 
    (SUM(a.total_pages) - SUM(a.used_pages)) * 8 AS UnusedSpaceKB
FROM 
    sys.tables t
INNER JOIN      
    sys.indexes i ON t.OBJECT_ID = i.object_id
INNER JOIN 
    sys.partitions p ON i.object_id = p.OBJECT_ID AND i.index_id = p.index_id
INNER JOIN 
    sys.allocation_units a ON p.partition_id = a.container_id
LEFT OUTER JOIN 
    sys.schemas s ON t.schema_id = s.schema_id
WHERE 
    t.NAME NOT LIKE 'dt%' 
    AND t.is_ms_shipped = 0
    AND i.OBJECT_ID > 255 
GROUP BY 
    t.Name, s.Name, p.Rows
ORDER BY 
    t.Name
 

 

Got this query from here.

Batch Id xxx not found. Check if batch and party exist. (Microsoft.BizTalk.Edi.Shared)

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)