RML Utilities for SQL Server中ReadTrace不能正常使用的一种情况
在几台电脑上安装了RML Utilities for SQL Server,运行ReadTrace.exe以后,有的电脑不能正常使用,报错信息如下
Unhandled Exception: System.TypeInitializationException: The type initializer for '<Module>' threw an exception. ---> <C
rtImplementationDetails>.ModuleLoadException: The C++ module failed to load during vtable initialization.
---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.SqlServer.XEvent.Linq.dll' or one of i
ts dependencies. 找不到指定的模块。
at ?A0xe13f2859.??__E??_7?$TXEtoTRCConverter_Ignore@$0A@E@@6B@@@YMXXZ()
at _initterm_m((fnptr)* pfbegin, (fnptr)* pfend)
at <CrtImplementationDetails>.LanguageSupport.InitializeVtables(LanguageSupport* )
at <CrtImplementationDetails>.LanguageSupport._Initialize(LanguageSupport* )
at <CrtImplementationDetails>.LanguageSupport.Initialize(LanguageSupport* )
--- End of inner exception stack trace ---
at <CrtImplementationDetails>.LanguageSupport.Initialize(LanguageSupport* )
at .cctor()
--- End of inner exception stack trace ---
看了下错误提示,是加载Microsoft.SqlServer.XEvent.Linq.dll的时候报的错,但是分明这个文件就在RML Utilities安装目录里。google了一下也没有结果。
再研究了一下错误提示,是C++模块的错误,对比了一下能正常运行ReadTrace程序的机器和不能正常运行的机器,发现不能正常的机器上没有安装Visual C++ 库的运行时组件(Microsoft Visual C++ Redistributable Package),尝试了安装Microsoft Visual C++ 2008 SP1 Redistributable Package和Microsoft Visual C++ 2010 SP1 Redistributable Package以后确定,需要安装2010版的运行时组件。当然,一般电脑安装各种程序以后会自动安装这个组件。
浙公网安备 33010602011771号