Home Dashboard Directory Help
Search

Cannot open server TraceFile with SQL Server R2 x64 by JonM


Status: 

Closed
 as By Design Help for as By Design


4
0
Sign in
to vote
Type: Bug
ID: 483926
Opened: 8/19/2009 1:53:59 PM
Access Restriction: Public
1
Workaround(s)
view
4
User(s) can reproduce this bug

Description

I'm trying to programatically read in a Server trace file using the Microsoft.SqlServer.Management.Trace.TraceFile object in the Microsoft.SqlServer.ConnectionInfoExtended.dll. My application works just fine on SQL Server 2008 SP1 x86. I'm testing SQL Server 2008 R2 August CTP x64 on Windows 2008 SP1 x64.

When I initalize the reader I get an the error 'Failed to intialize object reader'.
The inner exception is:
{"Could not load file or assembly 'file:///C:\\Program Files\\Microsoft SQL Server\\100\\Tools\\Binn\\pfclnt.dll' or one of its dependencies. The system cannot find the file specified.":"file:///C:\\Program Files\\Microsoft SQL Server\\100\\Tools\\Binn\\pfclnt.dll"}

Here is the problem. The pfclnt.dll does not exist in the 64-bit "Program Files" folder. It only exists in the 32-bit "Program Files (x86)" folder. Copying the 32-bit pfclnt.dll into the regular x64 Program Files does not fix the problem either.
Details
Sign in to post a comment.
Posted by johnv20 on 2/9/2012 at 2:49 AM
Agree completely with Mike's comments below - closing this bug as designed really isn't acceptable
Posted by Mike Honey - Manga Solutions on 4/12/2011 at 11:06 PM
Hi Microsoft. Your reply and the status of this issue (Closed as By Design) indicate a concerning lack of understanding of the fundamental issue.

Your product should work the same way on x64 or x32. Any feature that doesn't work seamlessly on either platform should be fixed so it does. New features should not be released until they work on both platforms.

When customers follow Microsoft's recommendation to install SQL Server on x64, they are not informed that various components do not work, and that you don't intend to fix them.
Posted by Microsoft on 8/30/2009 at 10:17 PM
Hi jonm,

TMO (Trace Management Object) only works in 32-bit environment, because it is built on top of SMO which is 32-bit only.

From the error, it seems your program is trying to access prclnt.dll from the wrong location:
The system cannot find the file specified.":"file:///C:\\Program Files\\Microsoft SQL Server\\100\\Tools\\Binn\\pfclnt.dll". It should be in "C:\Program Files(x86)\..." instead.

Shirley Wang
Sign in to post a workaround.
Posted by JonM on 8/20/2009 at 12:32 PM
The only way to get this to work is to manually change the .NET Assembly so it runs in 32-bit mode all of the time. To do this:

Install Windows SDK for Server 2008 and .NET Framework 3.5.
Run "corflags.exe <AssemblyName> /32BIT+"

I added this to my post-build events so it runs on the file generated. After doing this you cannot debug with visual studio very well. It complains the image is in the wrong format. To fix this I change the debug option "Start Project" to "Start external program" and select the exe that is being compiled.