Mariusz, Gorzoch tech Blog

Reading MSDTC log

with 2 comments

I was working today on some issues around MSDTC. Our production BizTalk for some reason couldn’t enlist transaction to SQL server. We were trying different things and on the end end-up with trying to read MSDTC log. As this task looks simple, it is for some reason not. Here is some guide what you need to do if you want to see what is happening behind the scene:

  1. If you want to analyze MSDTC log located under : “C:\WINDOWS\system32\MsDtc” you need to have tool called “tracefmt”. The problem with this tool is that it can not be just downloaded… instead of that, you need to get entire DDK package from Microsoft site (DDK site) which weight around ~700Mb, install it on your box (complete installation) and then you will find this tool under : “C:\WinDDK\7600.16385.1\tools\tracing\i386” (just grape entire content from this folder)
  2. Now you need to go to the box where your log is placed, and switch to “C:\WINDOWS\system32\MsDtc\Trace”. When you get there then past what ever you had in “i386” folder
  3. Now we are almost ready to parse. I said almost, as you cannot just use the MSDTC.log file located under “C:\WINDOWS\system32\MsDtc” (parsing that will give you empty result). If you want to see what is happening in your MSDTC you need to close current tracking session and open new one. To do so go to “cmd” and start “dcomcnfg”. When it’s open then navigate to :

“Component Services”->”Computers”->”My Computer”, right click and open properties,switch to MSDTC tab and then hit “Tracking options”. This should give you “Tracking options” window. Please notice here that all checkboxes in this window. I suggest you to do the same as it will give you the better overview.

Now, you need to click:

  • Stop Session and then “New session” (this will create you file under “\trace” folder with current date and time in name contains all trace data till the time when you clicked “stop session”
  • then perform whatever operation you need around MSDTC (all of them will be tracked)
  • perform “Flush data” and “Stop session” (this will create new trace file under “\trace” folder.

Now you should get new “trace” files under “\trace” folder:


4. Now we can perform transformation of log into more readable format. To do so you need to go to “cmd”, navigate under “C:\WINDOWS\system32\MsDtc\Trace” folder and call :

msdtcvtr -tracelog dtctrace.log.2010-03-18-15-15-47-0595-00 -o prob2
(where you need to replace “dtctrace.log.2010-03-18-15-15-47-0595-00” with your log file name)

this will cause new window to open with your trace:

have fun.


Written by Mariusz Gorzoch

18 March 2010 at 16:49

Posted in Bez kategorii

2 Responses

Subscribe to comments with RSS.

  1. You don’t need to download entire DDK. You can download 500KB file for Windows SDK (http://msdn.microsoft.com/en-us/windows/bb980924) and then choose just what you need to be installed (Tools). Both x64 and x32 versions of tracefmt.exe will be there

    Gregory Suvalian

    12 August 2011 at 17:12

  2. I am unable to find the 64 bit version of tracefmt.exe, can anyone please send me the URL for downloading that? I had downloaded an installable from http://www.microsoft.com/en-us/download/details.aspx?id=11800…but when I click on “KitSetup” and install it, I don’t see a folder for 64 bit in …WinDDK\7600.16385.1\Tools\tracing folder (but I see folders for amd64, ia64 and i386). Please help.


    4 May 2012 at 08:33

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: