Fixing “Activity Monitor Unable to Execute Queries” Error in SQL Server 2008 R2 x64 Edition


2 views

Many DBAs working with SQL Server 2008 R2 x64 Developer Edition encounter this frustrating scenario: when launching Activity Monitor in SSMS, they're greeted with:

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.

The core issue stems from the Resource Monitoring infrastructure failing to identify the SQL Server process ID on 64-bit systems. The Microsoft Connect bug report (#351176) confirms this affects multiple SQL Server 2008 versions when:

  • Running on 64-bit Windows
  • Using certain authentication methods
  • With specific service account configurations

While Microsoft hasn't released an official patch, these methods have proven effective:

-- Solution 1: Use dedicated admin connection
EXEC sp_configure 'remote admin connections', 1;
RECONFIGURE;

-- Then connect using ADMIN: prefix in SSMS

Alternatively, modify the registry (backup first!):

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\100\ConfigurationState]
"CommonFiles"=dword:00000001
"SQL_Binaries"=dword:00000001

When Activity Monitor fails, consider these T-SQL alternatives:

-- Get current sessions
SELECT 
    s.session_id,
    s.login_name,
    s.status,
    r.command,
    r.wait_type,
    r.wait_time
FROM sys.dm_exec_sessions s
LEFT JOIN sys.dm_exec_requests r ON s.session_id = r.session_id
WHERE s.is_user_process = 1;

-- Monitor blocking
SELECT 
    blocking.session_id AS blocking_session_id,
    blocked.session_id AS blocked_session_id,
    waitstats.wait_type AS blocking_resource,
    waitstats.wait_duration_ms
FROM sys.dm_exec_connections AS blocking
INNER JOIN sys.dm_exec_requests blocked ON blocking.session_id = blocked.blocking_session_id
OUTER APPLY sys.dm_os_waiting_tasks waitstats
WHERE waitstats.session_id = blocked.session_id;

To avoid this issue during new installations:

  • Always run SSMS as administrator
  • Configure SQL Server service accounts with proper permissions
  • Apply latest cumulative updates for SQL Server 2008 R2

Many SQL Server administrators encounter this specific error when trying to use Activity Monitor in SSMS:

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)

The issue primarily affects 64-bit systems running SQL Server 2008/R2, though similar symptoms have been reported in newer versions. The core problem lies in the WMI (Windows Management Instrumentation) provider failing to properly identify the SQL Server process.

Here are several methods that have worked for different environments:

Method 1: WMI Permissions Fix

Run this PowerShell script as administrator:

$namespace = "root\Microsoft\SqlServer\ServerEvents"
$account = "$env:USERDOMAIN\$env:USERNAME"

$acl = Get-WmiObject -Namespace $namespace -Class __SystemSecurity -List
$sd = $acl.PSBase.GetSecurityDescriptor()
$rule = New-Object System.Management.ManagementAccessRule($account, 
         "EnableAccount,RemoteAccess", $namespace, "None", "Allow")
$sd.DACL += $rule
$acl.PSBase.SetSecurityDescriptor($sd)

Method 2: Registry Modification

Create/modify this registry key:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\100\ConfigurationState]
"SQL_Engine_Core_Inst"=dword:00000001

Method 3: SQL Server Configuration

Execute these T-SQL commands:

USE master
GO
EXEC sp_configure 'show advanced options', 1
RECONFIGURE
GO
EXEC sp_configure 'remote admin connections', 1
RECONFIGURE
GO

If the issue persists, consider these alternatives:

  • Use DMVs (Dynamic Management Views): SELECT * FROM sys.dm_exec_requests
  • Create a custom monitoring solution using PowerShell and SQLCMD
  • Implement extended events for process monitoring

For systems where none of the above solutions work:

  1. Upgrade to a newer SSMS version (17.9.1 or later)
  2. Consider a clean reinstall of both SQL Server and SSMS
  3. Check Microsoft's official KB articles for potential hotfixes