Activity monitor is unable to execute queries against server

Is there any fix to get SSMS activity monitor working?

Problem:

SQL Server Activity Monitor fails with an error dialog:

TITLE: Microsoft SQL Server Management Studio
The Activity Monitor is unable to execute queries against server [SERVER]. Activity Monitor for this instance will be placed into a paused state. Use the context menu in the overview pane to resume the Activity Monitor.

ADDITIONAL INFORMATION:
Unable to find SQL Server process ID [PID] on server [SERVER] (Microsoft.SqlServer.Management.ResourceMonitoring)

I have this problem on SQL Server 2008 R2 x64 Developer Edition, but I think it is found in all 64bit systems using SQL Server 2008, under some yet unidentified conditions.

There is a bug report on this in Microsoft Connect, but it is not solved yet.


Check if SQLServer performance counters exist in the Performance Monitor. If not, manually rebuild all performance counters running lodctr /R command with administrative priviledges:

cd \windows\system32
lodctr /R

OK, I think I have found a solution.

The issue seems to be with the mix of 32bit and 64bit apps that need to query each-other.

If you enable the service Performance Counter DLL Host in the Services control panel, the Activity Monitor should now work.