I'm trying to monitor my database connections with Performance Monitor, but for some reason I can no longer add the counters.

Every set of counters OTHER than the two .NET Data Providers (for Oracle and SQL Server) works fine.

This was working not 10 minutes ago, when it just stopped. I've tried rebooting the box, which made no difference.

An suggestions on how to figure out how to re-enable these?

link|improve this question

75% accept rate
feedback

2 Answers

up vote 1 down vote accepted

Here's the solution:

Open cmd and run these commands:

regsvr32 /u netfxperf.dll
regsvr32 netfxperf.dll

Note: It seems that if you're running the profiler, and kill IIS without stopping it first, you get this problem.

link|improve this answer
feedback

I had this problem once as well. Windows seems to disable performance counters after a certain number of failures have occurred while trying to open them. I overrode this and never had a problem again by deleting the registry key.

Open regedit, and look under HKLM\SYSTEM\CurrentControlSet\Services.NET Data Provider for SqlServer\Performance. I can't recall the exact key name (DisablePerformanceCounters?), but its name will jump out at you as contributing to why it's disabled. Delete the key. I think it will take effect on the fly, but you may need to reboot.

I know this sounds a bit sketchy, especially as I can't recall the key name, but I know I saw this behavior and deleting the key fixed it for me.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.