Microsoft KB Archive/314429

= BUG: Performance counters for SQL Server .NET Data Provider are not reset =

Article ID: 314429

Article Last Modified on 3/13/2006

-

APPLIES TO


 * Microsoft .NET Framework 1.1
 * Microsoft .NET Framework 1.1
 * Microsoft .NET Framework 1.1 Service Pack 1
 * Microsoft ADO.NET 1.1

-



This article was previously published under Q314429





SYMPTOMS
When you install the .NET Framework on a computer, a .NET CLR Data performance counter is added to Performance Monitor (Perfmon). If you use these counters, you may notice that the perfomance information is not reset when you close and then reopen a .NET application. You also may notice that the perfomance information is not reset when you browse a .NET CLR Data performance counter on a remote computer.



RESOLUTION
To reset the performance counters, you must quit the application and close Performance Monitor.

Note that there is a delay before the counters are reset. If you reopen Performance Monitor immediately, the counters may not yet be cleared. If you wait a minute or two, they will be reset.



STATUS
Microsoft has confirmed that this is a problem in the .NET CLR Data counters. Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.



Steps to reproduce the behavior

 * 1) Write a .NET application that opens 10 SqlConnection objects.
 * 2) Start Performance Monitor, double-click Performance Logs and Alerts, and then double-click Counter Logs.
 * 3) Double-click System Overview, click Add, and then click .NET CLR Data in the Performance Object list.
 * 4) Click All counters to add all of the SqlClient counters, click Add, and then click OK.
 * 5) Run the application, and note that the number of connections that Performance Monitor shows is 10.
 * 6) Quit the application, and note that the number of connections that Performance Monitor shows is still 10.
 * 7) Run the application again. Note that the number of connections that Performance Monitor now shows is 20. The counter was not reset when the previous instance of the application was closed.

