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

Troubleshooting Guide: Service Broker Message Dispatcher Failure (Error 9739)

Why This Error Happens

Error 9739 occurs when the Service Broker’s message transmitter repeatedly fails to send messages, typically due to network connectivity issues between SQL Server instances, certificate or endpoint authentication failures, or a corrupted route/dialog configuration in the broker’s internal queues. This is commonly triggered after an OS upgrade to Windows Server 2025 or Windows 11 where TLS/SSL stack changes affect certificate validation, or when firewall rules block the Service Broker endpoint port (default 4022). Additionally, stale or orphaned conversation endpoints in sys.conversation_endpoints can cause the transmitter to retry against unreachable targets indefinitely.

Step-by-Step Resolution Guide

Step 1: Verify Service Broker Endpoint and Port Connectivity

  • Open SQL Server Configuration Manager and confirm the Service Broker endpoint is listening on the expected port (default TCP 4022).
  • Run SELECT * FROM sys.tcp_endpoints WHERE name = 'ServiceBrokerEndpoint'; to check the state_desc column — it must show STARTED.
  • Use Test-NetConnection -ComputerName <TargetServer> -Port 4022 in PowerShell to confirm the firewall on Windows Server 2025 isn’t blocking traffic.
  • If blocked, add an inbound rule via New-NetFirewallRule -DisplayName "SQL Service Broker" -Direction Inbound -Protocol TCP -LocalPort 4022 -Action Allow.

Step 2: Validate Certificates and Authentication

  • Check certificate expiration and validity using SELECT name, expiry_date FROM sys.certificates; on both the initiator and target databases.
  • Ensure the certificate’s START_DATE and EXPIRY_DATE align with the current system clock, since Windows Server 2025 enforces stricter time-sync validation via W32Time.
  • Re-create the Service Broker certificate if expired:
  CREATE CERTIFICATE SB_Certificate 
  WITH SUBJECT = 'Service Broker Certificate', 
  START_DATE = '2025-01-01', EXPIRY_DATE = '2027-01-01';
  • Re-exchange the public key certificates between the initiating and target SQL Server instances.

Step 3: Clear Corrupted or Stale Conversations

  • Query SELECT * FROM sys.conversation_endpoints WHERE state NOT IN ('CO'); to identify stuck or erroring conversations.
  • End problematic conversations manually using:
  END CONVERSATION 'conversation_handle' WITH CLEANUP;
  • Restart the SQL Server Service Broker task internally by toggling it off and on:
  ALTER DATABASE [YourDB] SET DISABLE_BROKER;
  ALTER DATABASE [YourDB] SET ENABLE_BROKER;

Step 4: Review SQL Server Error Logs and Event Viewer

  • Open Windows Event Viewer under Applications and Services Logs > MSSQLSERVER to correlate Error 9739 with any TCP/IP or TLS handshake failures.
  • Cross-reference timestamps with the SQL Server error log (ERRORLOG file, typically in C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Log\) to pinpoint which remote service or route is failing.

Alternative or Verification Steps

  • After applying fixes, run SELECT * FROM sys.dm_broker_connections; — a healthy connection should show state = 'CONNECTED' with no repeated error entries in sys.messages.
  • If the issue persists, drop and recreate the affected ROUTE and SERVICE objects entirely, then re-test message delivery using a sample SEND ON CONVERSATION statement to confirm successful transmission.