This article was previously published under Q314429
This article has been archived. It is offered "as is" and will no longer be updated.
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.
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.
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
Write a .NET application that opens 10 SqlConnection objects.
Start Performance Monitor, double-click Performance Logs and Alerts, and then double-click Counter Logs.
Double-click System Overview, click Add, and then click .NET CLR Data in the Performance Object list.
Click All counters to add all of the SqlClient counters, click Add, and then click OK.
Run the application, and note that the number of connections that Performance Monitor shows is 10.
Quit the application, and note that the number of connections that Performance Monitor shows is still 10.
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.
For more information about performance counters, click the following article number to view the article in the Microsoft Knowledge Base:
216950 How to enable ODBC Connection Pooling performance counters