SQLTeam.com | Weblogs | Forums

ClearTrace on Windows 10 - Exception

sql2012

#1

I am not sure if this is specific to Windows 10 issue but:

  • Downloaded latest version
  • Local Instance is SQL Server 2012 and a SQL Server 2008 R2 (I get the same thing trying both)
  • Trace files are from SQL Server 2005 instance

This is the message I get when attempting to import for the first time:

Files to process: 2 ( 315.5 MB )


Processing: SEBASTIAN_PerfCapture.trc


Trace File Read Error in C:\Users\wshaw\Documents\PerfCapture.trc (Exception has been thrown by the target of an invocation.)
Inner Exception: Exception has been thrown by the target of an invocation.
Inner Exception: Failed to initialize object as reader.
Inner Exception: Could not load file or assembly 'file:///C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\pfclnt.dll' or one of its dependencies. The system cannot find the file specified.
You can visit the support forum at http://forums.sqlteam.com/c/cleartrace
Done.

Configuration file has not been modified, and I am running the ClearTrace.exe as administrator (e.g. using the "Run As Admin" option).


#2

Do you have the full blown SQL Server installed for both 2012 and 2008 R2?

It's acting like it can't find part of the SMO library.


#3

Yes, full instance running with management tools and all.


#4

Just did this on Window Server 2012 with SQL Server 2012 installed and get the exact same result.


#5

Hmmm. Can you try running the following PowerShell Script for me? And paste the output back here?

cls
$PSVersionTable.PSVersion
[reflection.assembly]::loadwithpartialname("Microsoft.SqlServer.ConnectionInfoExtended")
[reflection.assembly]::Load("Microsoft.SqlServer.ConnectionInfoExtended, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91");

#6

For the Windows 10 machine:

PS C:\Users\wshaw> $PSVersionTable.PSVersion

Major Minor Build Revision


5 0 10240 16384

PS C:\Users\wshaw> [reflection.assembly]::loadwithpartialname("Microsoft.SqlServer.ConnectionInfoExtended")

GAC Version Location


True v2.0.50727 C:\WINDOWS\assembly\GAC_MSIL\Microsoft.SqlServer.ConnectionInfoExtended\12.0.0.0__89845dcd8080...

PS C:\Users\wshaw> [reflection.assembly]::Load("Microsoft.SqlServer.ConnectionInfoExtended, Version=11.0.0.0, Culture=ne
utral, PublicKeyToken=89845dcd8080cc91");

GAC Version Location


True v2.0.50727 C:\WINDOWS\assembly\GAC_MSIL\Microsoft.SqlServer.ConnectionInfoExtended\11.0.0.0__89845dcd8080...


#7

Hmmm. I'm stumped. That's the same code I'm using to load the SMO libraries. And I've run it before on Windows 2012 with SQL Server 2012.

I'm assuming you're running the x64 version -- which shouldn't matter.


#8

So there isn't going to be a quick fix for this. The code that dynamically loads one of five SMO libraries is ... interesting. I'm trying to simplify that but it's deep in the guts and needs lots of testing. I don't really have an interim solution and I can't reproduce the problem.


#9

Hello,

Unfortunately no help from my side but I would like to note that I get exactly the same error when trying to run ClearTrace.

I use SQL Server 2012 Developer edition, version 11.0.5343.0 and I am on Windows 10. I get the same output when I run the Powershell script.

Martijn


#10

Please see the following topic for a build that may fix the SMO issue:


#11

Afraid I get the same error. I have also done a full rebuild of this laptop since the initial error, so it is a fresh install of Windows 10 and SQL Server 2012.


#12

I had this exact issue this morning while testing out Cleartrace for the first time. It looks like in my case I had SQL 2012 management tools installed while the database engine was 2016. Once I downloaded the new management tools and installed them the issue went away.