Error: sql activity monitor unable to find sql server process id…

Hahh, my favourite infrastructure team built a development box and handed over to me. The first shocking error message I got:

=================================== The Activity Monitor is unable to execute queries against server %s 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. =================================== Unable to find SQL Server process ID %i on server %s (Microsoft.SqlServer.Management.ResourceMonitoring)


Lovely, isn't it? ;) The solution in our case was pretty simple (I remembered this error message since SQL 2005): SQL Server performance counters were corrupted and needed to rebuild them. You can use the following command to rebuild all performance counters on your server:

1cd %systemdrive%\windows\system32
2lodctr /R