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

Troubleshooting Guide: SQL Server Error 9672

Why This Error Happens

Error 9672 is an informational message raised by Service Broker when it internally cleans up messages belonging to a conversation that has ended or timed out, typically due to conversation lifetime expiration or an explicit END CONVERSATION call. This is often triggered by orphaned conversation groups left behind when activation stored procedures fail silently, crash, or do not properly call RECEIVE/END CONVERSATION. In rare cases, it can also surface when the underlying Service Broker queue or its associated transmission queue has become corrupted after an unexpected server shutdown or improper failover in an Always On Availability Group setup.

Step-by-Step Resolution Guide

Step 1: Identify the Affected Queue and Conversation

  • Run the following query to locate the queue referenced by the ID in the error message:
SELECT name, object_id FROM sys.service_queues WHERE object_id = <queue_id>;
  • Cross-reference the conversation handle from the error against sys.conversation_endpoints to determine its current state:
SELECT conversation_handle, state_desc, lifetime FROM sys.conversation_endpoints WHERE conversation_handle = '<handle>';

Step 2: Review and Fix the Activation Stored Procedure

  • Open the activation procedure bound to the queue (check via sys.service_queues.activation_procedure).
  • Ensure every code path includes a TRY...CATCH block and explicitly calls END CONVERSATION @handle after processing or on error.
  • Verify there are no long-running transactions holding locks on the queue, which can cause messages to be force-removed when the conversation times out.

Step 3: Check for Orphaned Conversation Groups

  • Run sys.transmission_queue to see if there are stuck or undeliverable messages contributing to broader queue instability.
  • If orphaned groups exist, clean them up safely:
END CONVERSATION '<conversation_handle>' WITH CLEANUP;
  • On Windows Server 2025, confirm the SQL Server Service Broker endpoint isn’t blocked by Windows Defender Firewall (default TCP port 4022) if this is a cross-database or cross-instance dialog.

Step 4: Validate Queue and Database Health

  • Run DBCC CHECKDB on the affected database to rule out corruption as a root cause, especially if the server recently had an unexpected shutdown:
DBCC CHECKDB ('YourDatabaseName') WITH NO_INFOMSGS, ALL_ERRORMSGS;
  • If corruption is found specifically in Service Broker system tables, restore from the last known good backup rather than attempting repair, as REPAIR_ALLOW_DATA_LOSS can affect broker metadata integrity.

Alternative or Verification Steps

  • Monitor SQL Server Error Log and Extended Events (broker_queue_disabled, broker_activation) over a 24-hour period to confirm Error 9672 no longer recurs after the activation procedure fix.
  • If the issue persists, as a temporary workaround, disable and re-enable activation on the queue to force a clean state: ALTER QUEUE QueueName WITH ACTIVATION (STATUS = OFF); followed by STATUS = ON.