Microsoft KB Archive/912417

= The module information is represented incorrectly when you profile managed code that is running in SQL Server 2005 by using performance tools in Visual Studio Team Edition for Software Developers =

Article ID: 912417

Article Last Modified on 2/15/2006

-

APPLIES TO


 * Microsoft SQL Server 2005 Standard Edition
 * Microsoft SQL Server 2005 Developer Edition
 * Microsoft SQL Server 2005 Enterprise Edition
 * Microsoft SQL Server 2005 Express Edition
 * Microsoft SQL Server 2005 Workgroup Edition
 * Microsoft Visual Studio 2005 Team System Developer Edition

-



Bug #: 408396 (SQLBUDT)



SYMPTOMS
When you use performance tools in Microsoft Visual Studio Team Edition for Software Developers to profile managed code that is running in Microsoft SQL Server 2005, the information about SQL Server integration with the Microsoft .NET Framework common language runtime (CLR) module is represented incorrectly.

For example, if you try to profile managed code of a user-defined function in SQL Server 2005, you may notice that the name of the user-defined function is incorrectly represented as LRStubOrUnknownAddress. Additionally, if you develop your own tool by using the CLR Profiling API, the tool may not work correctly.



CAUSE
This problem occurs because the module load event is not generated with the CLR that is being hosted within the SQL Server process.



WORKAROUND
If you want to profile some part of your managed code, follow these steps:
 * 1) Use Visual Studio 2005 to create a separate project that is not a SQL Server project.
 * 2) Profile the separate project.
 * 3) Integrate the separate project into a SQL Server project. Note that the code that you profile cannot reference any SQL Server objects, such as the SqlContext object.



STATUS
This behavior is by design.

Keywords: kbprb kbexpertiseadvanced kbsql2005clr KB912417

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.