Where do I get tracefmt.exe? And how do I read my MSDTC traces?
Asked Answered
S

8

26

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?

Sheply answered 25/8, 2009 at 17:0 Comment(1)
Approach suggested by Thomas Bratt helped me to solve this issue (Copying the exe from C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\x64 to the Trace folder).Cheboksary
L
12

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.

Lannylanolin answered 25/8, 2009 at 17:5 Comment(2)
Thank you! I wish the guys or girls who documented MSDTC would have included this important detail instead of referring to it consistently as "The SDK"Sheply
If you don't want to install the whole SDK, mount the ISO file, go to the WDK folder and locate the file tracingtool_x64fre_cab001.cab (x86 or ia64 depending on your architecture) and extract the file _tracefmt.exe_00002 to a folder of your choice. Rename the file to tracefmt.exe and you're done.Thundershower
S
33

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

Stupidity answered 13/6, 2012 at 9:49 Comment(2)
Saves downloading anything, especially the massive driver kit.Mounting
I have just copied TraceFmt.exe from another server to same folder and you can use directly or with batch file. Works like a champ!!!Hubing
P
19

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
Pygidium answered 6/9, 2010 at 23:46 Comment(3)
It keeps telling me that traceprt.dll is missing but that dll is in the path. I also tried to register it whith regsvr32 but that didn't work.Deteriorate
This doesn't seem to work on Windows 7 x64 (even after adding traceprt.dll to C:\Windows\SysWow64, then it stops complaining about the dll). Using amd64 version of tracefmt.exe from Windows DDK works fine, though.Radiotelephony
Confirmed: it does not work for Windows 7 x64, however tracefmt.exe taken from amd64 folder magically works even with Intel processorSemiprofessional
L
12

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.

Lannylanolin answered 25/8, 2009 at 17:5 Comment(2)
Thank you! I wish the guys or girls who documented MSDTC would have included this important detail instead of referring to it consistently as "The SDK"Sheply
If you don't want to install the whole SDK, mount the ISO file, go to the WDK folder and locate the file tracingtool_x64fre_cab001.cab (x86 or ia64 depending on your architecture) and extract the file _tracefmt.exe_00002 to a folder of your choice. Rename the file to tracefmt.exe and you're done.Thundershower
R
12

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.

Robins answered 3/8, 2010 at 19:43 Comment(1)
If the server that generated the trace is a 64 bit machine, you will need to use the x64 version of exe.Caracalla
B
5

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)
Blank answered 28/2, 2012 at 16:45 Comment(1)
True for VS 2008, which I was lucky to find. Unfortunately on a system with VS 2010 and VS 2012, I could not find it, neither under Program Files (where there is no Microsoft SDKs sub folder any more) nor under Program Files (x86), where they seemed to have moved it.Darnelldarner
D
2

Tracefmt.exe comes with the Windows Driver Kit.

http://www.microsoft.com/downloads/details.aspx?FamilyID=2105564e-1a9a-4bf4-8d74-ec5b52da3d00&displaylang=en

Descant answered 25/8, 2009 at 17:5 Comment(0)
E
1

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
Exist answered 22/11, 2016 at 9:23 Comment(0)
D
0

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).
Darnelldarner answered 13/3, 2015 at 7:33 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.