"The transaction has already been implicitly or explicitly committed or aborted."
The error causes an exception to be thrown during the eConnect_EntryPoint call, and offers no other information.
I dont' yet fully understand the underlying cause of the error, but have come across two possible solutions.
The first, and apparently most common means of solving the problem is to add "Enlist=False" to the eConnect connection string. Unfortunately, I haven't been able to find a good explanation of the exact mechanics of how this parameter affects the connections and connection pooling with DTC and COM, but this modifies the way that eConnect uses connections and invokes transactions.
This approach did make the error go away, but after reading more on the issue, it seems that this solution only eliminates the error, but does not solve the underlying problem. By disabling transactions, it can possibly expose you to partial transactions and corrupt data.
The second solution is discussed on this forum thread. The last two posts mention that changing the MS DTC Security Settings to "No Authentication Required" may be the preferred method for resolving the underlying problem.
That particular authentication setting, under the "Transaction Manager Communication" settings, is typically set based on your network configuration. The eConnect Install and Admin guide offers the following instructions:
Configuring DTC
If the two computers are in the same domain, the default configuration for DTC can be used with eConnect. If you have made modifications to the security configuration for DTC, you must be sure the following settings are used:
- Network DTC Access enabled
- Allow Inbound communications
- Allow Outbound communications
- Mutual Authentication Required (when running in a domain environment)
- No Authentication Required (when running in a Windows workgroup environment or the client machine is pre-Windows XP SP2)
If the two computers are in a Windows workgroup, or are in domains that do not have an established trust relationship, update your DTC security configuration to use No Authentication Required.
I've highlighted the key points in red. When you are running in a single domain environment, or in a multi-domain environment where a trust has been established, Mutual Authentication should work. But you will otherwise need to use No Authentication Required.
Finally, the same thread has a pointer over to an MSDN forum which discusses the issue in a non-eConnect context, and indicates that a firewall may cause DTC communication to be blocked.
Given what I've read, my current assumption is that when my client's servers were moved to the new data center, a new domain relationship was setup, or a network configuration change occurred that caused the DTC communication to stop functioning properly. The client workstation and GP server both are set to "Mutual Authentication Required", so this could be the real issue.
Later this week I'm going to modify my code to remove the Enlist=False connection parameter and switch both machines to No Authentication Required and see if that works.
Please note that we were facing the same issues and after 1 week of investugation we cme to know that DTC has different IP assigned when working in clustered SQL server. We had to open that DTC IP across firewall on port 135 to work.
ReplyDeleteMany thanks for all the other information
Thanks Faraz, that's good information!
ReplyDeleteIn case you didn't see it already, I have a post that discusses using DTCPing and DTCTester, which can help to narrow down the possible DTC issues and causes.
http://dynamicsgpland.blogspot.com/2009/04/more-than-i-ever-wanted-to-know-about.html