Troubleshooting Guide: SQL Server Error 3612 — “SQL Server Execution Times” / CPU Time Reporting Anomaly
Why This Error Happens
Error 3612 typically surfaces when SQL Server’s statistics output mechanism (SET STATISTICS TIME ON) encounters an interruption while reporting execution time metrics, often due to a corrupted plan cache or an inconsistent session state. This can also occur when Windows Server 2025’s updated performance counter architecture conflicts with SQL Server 2025’s telemetry hooks, causing malformed CPU time strings to be returned mid-query. In some cases, insufficient permissions on the Performance Monitor Users group prevent SQL Server from correctly reading CPU tick counters from the OS, triggering this error as a fallback message.
Step-by-Step Resolution Guide
Step 1: Verify SQL Server Service Account Permissions
- Open Computer Management > Local Users and Groups > Groups.
- Confirm the SQL Server service account is a member of Performance Monitor Users and Performance Log Users.
- Run
net localgroup "Performance Monitor Users"in an elevated PowerShell/Command Prompt to verify membership. - If missing, add it with:
net localgroup "Performance Monitor Users" "DOMAIN\SQLServiceAccount" /add
Step 2: Clear and Rebuild the Plan Cache
- Connect via SQL Server Management Studio (SSMS) 21 (compatible with SQL Server 2025).
- Run
DBCC FREEPROCCACHE;to clear potentially corrupted cached execution plans. - Follow with
DBCC FREESYSTEMCACHE('ALL');to ensure system-level caches are also reset. - Restart the SQL Server service via
services.mscornet stop MSSQLSERVER && net start MSSQLSERVER.
Step 3: Update SQL Server 2025 Cumulative Update (CU)
- Navigate to Microsoft Update Catalog and search for the latest Cumulative Update for SQL Server 2025.
- Download and install the CU package (typically an
.exeinstaller run with administrative rights). - Confirm the build number post-install by running
SELECT @@VERSION;in SSMS.
Step 4: Reset SQL Server Statistics Session Settings
- In your query window, explicitly reset session-level statistics flags before execution:
SET STATISTICS TIME OFF;SET STATISTICS TIME ON;- If the error persists in SSMS, close and reopen the query window to clear any corrupted session buffer.
Step 5: Check Windows Performance Counter Registry Health
- Open an elevated Command Prompt and run:
lodctr /Rto rebuild performance counter registry values. - Restart the Windows Management Instrumentation (WMI) service via
services.msc. - Restart the SQL Server instance to re-initialize counter bindings.
Alternative or Verification Steps
- Run a simple test query with
SET STATISTICS TIME ON;followed bySELECT 1;— if CPU time displays cleanly without Error 3612, the fix was successful. - If the issue persists, use SQL Server Profiler or Extended Events to capture the exact query/session triggering the error, and cross-reference with the SQL Server Error Log (
ERRORLOGfile, typically inC:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Log\) for additional context.