【发布时间】:2014-07-15 10:16:00
【问题描述】:
首先,我是一名 .NET 程序员新手,我一直在尝试使用自定义 SQL Profiler 跟踪器解决问题,就像这里描述的那样 - http://www.codeproject.com/Articles/20173/MS-SQL-Server-Profiler-with-NET
所以,我使用 TraceServer(http://technet.microsoft.com/en-us/library/Microsoft.SqlServer.Management.Trace.TraceServer.aspx) 类来 InitializeAsReader 并立即抛出一个
"Failed to initialize object as reader."
带有 InnerException -
"Could not load file or assembly 'file:///c:\\Program Files (x86)\\Microsoft SQL Server\\100\\Tools\\Binn\\pfclnt.dll' or one of its dependencies. The system cannot find the file specified.""
有趣的是,只有当我尝试连接到 SQL Profiler 2012 并且我在 2008R2 上没有遇到问题时才会发生这种情况。我还注意到 pfclnt.dll 存在于“C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn”中,而不是在跟踪中提到的文件夹中。
有没有办法让它从正确的位置加载它?为什么它一开始就看错了位置?
【问题讨论】:
标签: sql-server-2012 sql-server-profiler