The hidden tool – MSDTC Transaction Tracing


If you deal with MSDTC frequently, you might have noticed an option to toggle the tracing options for transactions in the MSDTC settings but I am not sure how many are really aware of what information is logged inside the trace file and how the trace file can be converted from a binary format to a text format. The built in transaction tracing is one of the least famous (but yet a very powerful) feature of MSDTC diagnostics. This tracing logs information about various stages of transaction propagation and gives you enough information about the various outcomes of a transaction. Using this tracing, you can not only determine the various transaction managers or resource managers involved in a transaction but you can also determine the cause of a transaction abort.

 

The transaction tracing becomes a powerful tool when the transactions are either taking too long to run or they are getting aborted intermittently and nothing inside your application is giving you any hint around why the transaction is getting aborted. If you observe one of the following errors inside your application, I recommend using the MSDTC transaction tracing to figure out more details about your transaction

  • The Microsoft Distributed Transaction Coordinator (MS DTC) has cancelled the Distributed Transaction
  • The transaction has been implicitly committed or aborted

 

Read the full post here...

Comments (11)

  1. Richard Reukema says:

    Can this trace be started via a script?  If so – how?????

    Thanks,

    Richard

  2. Adam Aldrich says:

    Great Article thanks for showing this awesome utility to help diagnose the many possible MSDTC issues that will pop up.

  3. Thanks for the information.

    Please note that the msdtcvtr.bat does not work if you try and run it from a path with spaces in. I copied the trace folder to my desktop and it wouldn’t work (because the C:Documents and Settings) – I had to put it into a different path with no spaces to make it work.

    I guess most people will do this directly in the default path C:WINDOWSsystem32MsDtc but I thought I’d mention it because it took me a while to work out what was wrong.

  4. Kevin Burton says:

    I can’t access the msdtc folder. I get an error that I don’t have access even though I am a member of the admin group. If I try to add or othersize change the permissions I see that the permissions are grayed out. Any ideas?

    Kevin

  5. Jason Alati says:

    I get the same error as Kevin on a Windows Server 2008 R2 machine.  I am a member of the Administrators group, but I can't get into the msdtc folder.

  6. RPSankar says:

    The path mentioned as "c:windowsmsdtctrace" in starting new session section is wrong, it should be "C:WINDOWSsystem32MsDtcTrace" instead.

  7. Earl says:

    Don't forget to press the flush button before new trace.  This is very important.

  8. Ilmagicsahert says:

    HI I have a question for you: We have a SQL Server 2008R2 Clustered instance, we need an application to have multihtread acces to the distributed transaction coordinator (MSDTC).

    Do we have to install the MSDTC into the owning resource group of the sql server instance, and make it dependant on it, OR install a cluster level MSDTC resource group, with own IP address and network name?

    Thank you in advande for helping me out

  9. Curious says:

    Is any of this technology used for wiretapping or remote viewing of text mssgs or email?

  10. Inconspicuous says:

    Thank you so much for helping me solve the transaction issue in my application. It turned out be the same error that you discussed in your article. Missing scope.Complete() command!

Skip to main content