2

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?

Peter Mortensen
  • 2,318
  • 5
  • 23
  • 24
chris
  • 3,993
  • 6
  • 28
  • 37

3 Answers3

3

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.

chris
  • 3,993
  • 6
  • 28
  • 37
1

Note: the accepted answer does not appear to apply to Windows 7 x64.

It seems that on the newer platform, netfxperf.dll isn't a COM dll at all. Therefore, using regsvr32 on it isn't going to work. This can be verified using several techniques - checking the registry, running Dumpbin, using Dependency Walker among others.

For me, rebuilding my performance counters (lodctr /R) as described here and rebooting fixed the problem.

killthrush
  • 111
  • 4
  • 1
    The op states that they're using Windows Server 2003, which is several versions removed and a totally different architecture to Windows 7 x64. So I'm not entirely sure your criticism is due, but it's noted nevertheless. – Mark Henderson Sep 27 '12 at 23:26
  • Good call - I missed the tag on that one. Will edit my post accordingly. – killthrush Sep 28 '12 at 21:31
0

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.

JohnW
  • 501
  • 3
  • 8