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

Troubleshooting Guide: SQL Server Error 9792 – “Could not forward the message because forwarding is disabled”

Why This Error Happens

This error occurs when Database Mail or Service Broker attempts to forward a message to another SQL Server instance, but the message forwarding feature is explicitly disabled on the local instance’s configuration. By default, SQL Server ships with forwarding disabled as a security precaution to prevent unauthorized relay of broker messages across linked instances. This typically surfaces in multi-instance Service Broker topologies where routing tables expect an intermediary hop that has not been configured to allow pass-through traffic.

Step-by-Step Resolution Guide

Step 1: Verify Current Broker Forwarding Configuration

  • Open SQL Server Management Studio (SSMS) and connect to the instance reporting Error 9792.
  • Run the following query to inspect the current Service Broker settings:
  SELECT name, is_broker_enabled, is_trustworthy_on 
  FROM sys.databases 
  WHERE name = 'msdb';
  • Confirm whether is_broker_enabled returns 0, which indicates forwarding is blocked at the database level.

Step 2: Enable Message Forwarding via ALTER ENDPOINT

  • Locate the Service Broker endpoint being used for routing.
  • Run the following T-SQL command to enable forwarding explicitly:
  ALTER ENDPOINT [ServiceBrokerEndpoint]
  STATE = STARTED
  AS TCP (LISTENER_PORT = 4022)
  FOR SERVICE_BROKER (MESSAGE_FORWARDING = ENABLED, MESSAGE_FORWARD_SIZE = 10);
  • Ensure the MESSAGE_FORWARD_SIZE value (in MB) matches your expected message traffic volume; the default minimum is 1.

Step 3: Restart the SQL Server Service

  • On Windows Server 2025 / Windows 11, open SQL Server Configuration Manager.
  • Navigate to SQL Server Services, right-click your instance (e.g., MSSQLSERVER), and select Restart.
  • Alternatively, use PowerShell with elevated privileges:
  Restart-Service -Name 'MSSQLSERVER' -Force

Step 4: Check Firewall and Network Configuration

  • Confirm that Windows Defender Firewall on Windows Server 2025 allows inbound/outbound traffic on port 4022 (default Service Broker port).
  • Run this command in an elevated PowerShell session to add a rule if missing:
  New-NetFirewallRule -DisplayName "SQL Broker 4022" -Direction Inbound -LocalPort 4022 -Protocol TCP -Action Allow

Alternative or Verification Steps

  • Re-run the original operation that triggered Error 9792 and check the SQL Server Error Log (Management > SQL Server Logs in SSMS) to confirm the message no longer appears.
  • If the error persists, query sys.transmission_queue and sys.conversation_endpoints to identify stuck messages, then manually re-route or end the problematic conversations using END CONVERSATION WITH CLEANUP.