Question

I followed the KB article from MS in order to turn on MSDTC trace. Unfortunately it was hard to follow, since it doesn't assume a very reasonable and obvious expectation of the reader, specifically "how do I read this binary log file?" I read this page from MSDN as well, where I find that I can't read the log file because I'm missing some executable called tracefmt.exe, and I'm apparently the only one anywhere with this problem.

Hence my question: Why don't I have tracefmt.exe and where do I get it? or, to get to the point: How do I read my MSDTC trace logs?

Was it helpful?

Solution

tracefmt (and traceview which is easier to use) are available in the Windows Driver Kit (WDK). It is available here: http://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=11800. It is in the WDK since this tracing technology is more commonly used in device drivers.

OTHER TIPS

With Visual Studio 2010 installed, I found the tool in the following location:

C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\x64\TraceFmt.exe

I then copied the .EXE to the following location:

C:\Windows\System32\Msdtc\Trace

And ran it as follows:

TraceFmt.exe dtctrace.log.2012-06-13-10-38-57-0601-00

Although most of the time I use msdtcvtr.bat, as follows:

C:\Windows\System32\Msdtc\Trace\msdtcvtr.bat -tracelog dtctrace.log.2012-06-13-10-38-57-0601-00

To save on downloading all of the WDK (600MB+), just for 200KB of files, I opted for a 4.7MB download by doing the following:

  1. Download "Windows XP Service Pack 2 Support Tools" from here: http://www.microsoft.com/downloads/details.aspx?FamilyId=49AE8576-9BB9-4126-9761-BA8011FABF38&displaylang=en
  2. If running from XP, just extract and go
  3. If running from 2003 (like I am), you'll get an error saying this can only be installed on XP. So to get around this, use a tool to extract the exe instead.
  4. Inside the exe will be a support.cab, extract the contents of this somewhere
  5. Look for these two files, tracefmt.exe and traceprt.dll. Copy these to your %windir%\system32\msdtc\trace directory

DTC Tracing

The Distributed Services Support Team blog goes over how to trace the DTC in more detail.

Windows Driver Kit

The links in the accepted answer seem to be broken. I've found the Windows Driver Kit homepage and current download link.

Once you have the ISO downloaded and you're at the installation screen, Microsoft Windows Driver Kit, select only Tools from Full Development Environment. The tracefmt.exe is in <install-path>\<version>\Tools\tracing\i386. Make sure you copy the version of tracefmt.exe from the 64-bit or 32-bit directory!

The blogger above moved those files to the DTC folder %systemroot%\MsDtc\Trace, probably so they were in the msdtcvtr.bat path.

After searching for tracefmt.exe and traceprt.dll from the above posts (and elsewhere) I found that you need the 64 bit version of the tools for the program to run on Windows Server 2008.

I found this blog post.

and found that if you have visual studio installed you should be able to find both the 64-bit and 32-bit versions for the exe and dll on your local machine:

  • ProgramFiles\Microsoft SDKs\Windows\v6.0A\Bin\ (32 bit)
  • ProgramFiles\Microsoft SDKs\Windows\v6.0A\Bin\x64\ (64 bit)

Very often you should use existed *.mof file for enconding trace files. In C:\Windows\System32\Msdtc\Trace\ u can see msdtctr.mof. This file has description of the trace files and u need to use it file like this:

tracefmt log_filename -tmf msdtctr.mof

I found Darren's and Thomas Bratt's answers quite helpful, but in order to successfully parse DTC files using tracefmt, I had to provide the tmf parameter:

tracefmt -tmf msdtctr.mof dtctrace.log

Otherwise every event turned out something like

Unknown( 21): GUID=75f91e0e-d50c-47c9-b06f-3f2013e9da73 (No Format Information found).
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top