windows 我从哪里获得 tracefmt.exe?我如何读取我的 MSDTC 跟踪?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1329583/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 06:41:10  来源:igfitidea点击:

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

windowsmsdtc

提问by Adam Ritenauer

I followed the KB article from MSin 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 MSDNas 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.

我按照MS 的知识库文章打开 MSDTC 跟踪。不幸的是,它很难理解,因为它没有假设读者有一个非常合理和明显的期望,特别是“我如何阅读这个二进制日志文件?” 我也从 MSDN阅读了这个页面,在那里我发现我无法读取日志文件,因为我缺少一些名为 的可执行文件tracefmt.exe,而且我显然是唯一一个遇到此问题的人。

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?

因此我的问题是:为什么我没有 tracefmt.exe 以及我从哪里得到它?或者,切入正题如何读取 MSDTC 跟踪日志?

采纳答案by Michael

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.

tracefmt(和更易于使用的 traceview)在 Windows 驱动程序工具包 (WDK) 中可用。可在此处获得:http: //www.microsoft.com/en-us/download/details.aspx?displaylang=en& id=11800。它在 WDK 中,因为这种跟踪技术更常用于设备驱动程序。

回答by Thomas Bratt

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

安装 Visual Studio 2010 后,我在以下位置找到了该工具:

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

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

I then copied the .EXE to the following location:

然后我将 .EXE 复制到以下位置:

C:\Windows\System32\Msdtc\Trace

C:\Windows\System32\Msdtc\Trace

And ran it as follows:

并按如下方式运行它:

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

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

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

虽然我大部分时间使用的是msdtcvtr.bat,如下:

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

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

回答by eyesnz

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:

为了节省下载所有 WDK (600MB+)(仅 200KB 文件)的费用,我选择了 4.7MB 下载,执行以下操作:

  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.exeand traceprt.dll. Copy these to your %windir%\system32\msdtc\tracedirectory
  1. 从这里下载“Windows XP Service Pack 2 支持工具”:http: //www.microsoft.com/downloads/details.aspx?FamilyId=49AE8576-9BB9-4126-9761-BA8011FABF38& displaylang=en
  2. 如果从 XP 运行,只需解压并运行
  3. 如果从 2003 年开始运行(就像我一样),您会收到一条错误消息,指出它只能安装在 XP 上。因此,要解决此问题,请改用工具来提取 exe。
  4. 在 exe 里面会有一个support.cab, 把它的内容提取到某处
  5. 查找这两个文件,tracefmt.exe以及traceprt.dll. 将这些复制到您的%windir%\system32\msdtc\trace目录中

回答by Anthony Mastrean

DTC Tracing

故障码追踪

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

分布式服务支持团队博客更详细地介绍了如何跟踪 DTC

Windows Driver Kit

Windows 驱动程序套件

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

已接受答案中的链接似乎已损坏。我找到了Windows Driver Kit 主页当前下载链接

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!

下载 ISO 并进入安装屏幕 Microsoft Windows Driver Kit 后,仅从完整开发环境中选择工具。tracefmt.exe 位于<install-path>\<version>\Tools\tracing\i386. 确保从 64 位或 32 位目录复制 tracefmt.exe 版本!

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

上面的博主将这些文件移到了 DTC 文件夹中%systemroot%\MsDtc\Trace,可能因此它们在msdtcvtr.bat路径中。

回答by Darrin S.

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.

从上述帖子(和其他地方)中搜索 tracefmt.exe 和 traceprt.dll 后,我发现您需要 64 位版本的工具才能在 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:

并发现如果您安装了 Visual Studio,您应该能够在本地计算机上找到 exe 和 dll 的 64 位和 32 位版本:

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

回答by Alexander Shapkin

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:

很多时候你应该使用现有的 *.mof 文件来编码跟踪文件。在 C:\Windows\System32\Msdtc\Trace\ 中,您可以看到 msdtctr.mof。这个文件有跟踪文件的描述,你需要像这样使用它:

tracefmt log_filename -tmf msdtctr.mof

回答by Eugene Beresovsky

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 tmfparameter:

我发现 Darren 和 Thomas Bratt 的回答很有帮助,但为了使用 成功解析 DTC 文件tracefmt,我必须提供tmf参数:

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).