How do I determine problem with DTC in distributed application?

Joseph Hornsey
Joseph Hornsey used Ask the Experts™
I have a C# application that issues the following SQL Statement:

        internal void ClearCode(long requestId)
            string sql = "UPDATE MyRequest SET TempCode = NULL, AccountNumber = '' WHERE RequestId = {0}";
            using (MyDataContext db = new MyDataContext(connect))
                db.ExecuteCommand(sql, new object[] { requestId });

Which is failing with:

System.Transactions.TransactionManagerCommunicationException: Communication with the underlying transaction manager has failed. ---> System.Runtime.InteropServices.COMException (0x8004D01B): The Transaction Manager is not available. (Exception from HRESULT: 0x8004D01B)

My application runs on SERVERA and my database is clustered on SERVERB.
My connect string points to SERVERB and all other SQL statements seem to work fine.
We have DTC installed in the clustered environment on SERVERC.
MyDataContext is the class generated by the SQLMetal and represents the DB on SERVERB.

When I look at Component Services on my DBServer, it reports that DTC is alive and well.  When I look at the Services on my DBServer, it shows 2 instances of DTC Running (with Guids in the name), which I understand is normal as well.
When I look at Services in my AppServer (SERVERA), the DTC task is not running and when I try to start it it fails with:

Log Name:      Application
Source:        Microsoft-Windows-MSDTC
Date:          1/27/2010 3:04:55 PM
Event ID:      4163
Task Category: LOG
Level:         Error
Keywords:      Classic
User:          N/A
MS DTC log file not found. After ensuring that all Resource Managers coordinated by MS DTC have no indoubt transactions, please run msdtc -resetlog to create the log file.
Event Xml:
<Event xmlns="">
    <Provider Name="Microsoft-Windows-MSDTC" Guid="{719BE4ED-E9BC-4DD8-A7CF-C85CE8E4975D}" EventSourceName="MSDTC" />
    <EventID Qualifiers="49152">4163</EventID>
    <TimeCreated SystemTime="2010-01-27T22:04:55.000000000Z" />
    <Correlation />
    <Execution ProcessID="0" ThreadID="0" />
    <Security />

I tried running msdtc -resetlog on SERVERA, but I get the same results.

I used DTCPing between SERVERA and SERVERC (also between SERVERA and SERVERB) and it reports that everything is working fine.


SQLServer 2008 with all service applied.
Windows Server 2008 R2 with all service applied.
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®


 for MS DTC
Check   "Network DTC Access",
  "Allow Remote Clients",  
 "Allow Remote Administration",  
 "Allow Inbound", "Allow Outbound",  
 "No Authentication Required",  
  do not check "Enable Transaction Internet Protocal Transactions",  
 "Enable XA Transaction"

SQL Server DBA & Architect, EE Solution Guide
Awarded 2009
Distinguished Expert 2018
Kindly check whether MSDTC is enabled properly as per:

And make sure port 135 is excluded out of Windows Firewall along with msdtc.exe

Kindly check it out once by disabling Windows Firewall
Joseph HornseyPresident and Janitor


Thank you!
Raja Jegan RSQL Server DBA & Architect, EE Solution Guide
Awarded 2009
Distinguished Expert 2018


Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial