How to fix Error 10337 on Windows Server 2025 / Windows 11

Troubleshooting Guide: SQL Server Error 10337 – “An Internal Error Occurred”

Why This Error Happens

Error 10337 in Microsoft SQL Server 2025 typically occurs when the Service Broker or internal dialog management subsystem encounters a conflict while processing queued messages, often due to corrupted system catalog metadata or insufficient permissions on the msdb database. This can also be triggered by orphaned endpoints or certificates used for internal authentication becoming invalid after a Windows Server 2025 security patch or OS upgrade. In some cases, memory pressure combined with a corrupted transaction log file prevents SQL Server’s internal components from completing a handshake, resulting in this generic internal error.

Step-by-Step Resolution Guide

Step 1: Verify SQL Server Service Account Permissions

  • Open Services.msc on Windows Server 2025 / Windows 11 and confirm the SQL Server service is running under a valid domain or managed service account.
  • Ensure the account has db_owner rights on msdb and master databases.
  • Run the following T-SQL to check role membership:
  EXEC sp_helprolemember 'db_owner';

Step 2: Rebuild Service Broker Configuration

  • Check if Service Broker is enabled on the affected database:
  SELECT is_broker_enabled FROM sys.databases WHERE name = 'YourDBName';
  • If disabled or corrupted, re-enable it with:
  ALTER DATABASE YourDBName SET ENABLE_BROKER WITH ROLLBACK IMMEDIATE;
  • Restart the SQL Server service afterward to apply changes.

Step 3: Check and Repair System Database Integrity

  • Run DBCC CHECKDB against msdb and master to rule out corruption:
  DBCC CHECKDB ('msdb') WITH NO_INFOMSGS, ALL_ERRORMSGS;
  • If corruption is found, restore msdb from a known good backup located typically at C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Backup\.

Step 4: Clear and Rebuild SQL Server Internal Cache

  • Open SQL Server Management Studio (SSMS) and execute:
  DBCC FREESYSTEMCACHE('ALL');
  • Restart the SQL Server (MSSQLSERVER) service via PowerShell:
  Restart-Service -Name 'MSSQLSERVER' -Force

Alternative or Verification Steps

  • Re-run the operation that originally triggered Error 10337 and check the SQL Server Error Log (C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Log\ERRORLOG) for recurrence.
  • If the error persists, apply the latest Cumulative Update (CU) for SQL Server 2025 from Microsoft, as internal errors are frequently patched in CU releases addressing Service Broker and catalog metadata bugs.