Troubleshooting Guide: SQL Server Error 9136 — “Stat Messages Could Not Be Processed”
Why This Error Happens
Error 9136 typically occurs when SQL Server’s internal statistics manager fails to process incoming statistics update messages, often due to corruption in the statistics metadata or the underlying system tables that track column/index statistics. This can result from abrupt service terminations, disk I/O failures during auto-update statistics operations, or conflicts caused by concurrent schema changes while statistics are being recalculated. In some cases, insufficient permissions on the tempdb database (used as a workspace for statistics calculations) can also trigger this error on Windows Server 2025 environments.
Step-by-Step Resolution Guide
Step 1: Verify Database Consistency
- Run
DBCC CHECKDB('YourDatabaseName') WITH NO_INFOMSGS, ALL_ERRORMSGS;to check for underlying corruption. - Review the SQL Server Error Log located at
C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Log\ERRORLOGfor related corruption flags tied to Error 9136. - If corruption is found, note the affected table/index ID for targeted repair.
Step 2: Rebuild or Update Statistics Manually
- Open SQL Server Management Studio (SSMS) and connect to the affected instance.
- Execute
EXEC sp_updatestats;to refresh all statistics in the current database. - For a specific table, run
UPDATE STATISTICS dbo.YourTableName WITH FULLSCAN;to force a full recalculation rather than a sampled one. - If the error persists, drop and recreate the statistics object using
DROP STATISTICS dbo.YourTableName.StatName;followed byCREATE STATISTICS StatName ON dbo.YourTableName (ColumnName);.
Step 3: Validate TempDB Health and Permissions
- Navigate to the TempDB file location (default:
C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\DATA\tempdb.mdf). - Ensure the SQL Server service account (visible in Services.msc under “SQL Server (MSSQLSERVER)”) has Full Control permissions on this directory.
- Restart the SQL Server service via PowerShell:
Restart-Service MSSQLSERVER -Force. - Confirm TempDB auto-growth settings are not capped too low, as insufficient space can interrupt stat processing.
Step 4: Apply Latest Cumulative Update
- Check your current build number using
SELECT @@VERSION;. - Download and install the latest Cumulative Update (CU) for SQL Server 2025 from the Microsoft Update Catalog, as this error is sometimes tied to a known statistics-engine bug patched in recent builds.
- Reboot the Windows Server 2025 host after installation to finalize the update.
Alternative or Verification Steps
- After applying fixes, run
DBCC SHOW_STATISTICS('YourTableName', 'StatName');to confirm the statistics object loads without error. - If the issue persists after a CU update and manual rebuild, consider restoring the specific affected table from a clean backup, as this indicates physical-level corruption rather than a logical statistics glitch.