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

Troubleshooting Guide: SQL Server Error 9710 – Invalid Conversation Group Reference

Why This Error Happens

This error occurs when a Service Broker conversation endpoint points to a conversation group ID that no longer exists in the sys.conversation_groups metadata table, typically due to corruption in the Service Broker internal tables or an interrupted cleanup operation. It can also arise from inconsistent state caused by improper database restores, replication conflicts, or a crash during an active dialog conversation. In most cases, this indicates that the internal referential integrity between sys.conversation_endpoints and sys.conversation_groups has been broken.

Step-by-Step Resolution Guide

Step 1: Verify Database Consistency

  • Open SQL Server Management Studio (SSMS) and connect to the affected instance.
  • Run DBCC CHECKDB ('YourDatabaseName') WITH NO_INFOMSGS, ALL_ERRORMSGS; to check for underlying corruption.
  • Review the output specifically for errors referencing sys.conversation_endpoints or sys.conversation_groups.

Step 2: Identify Orphaned Conversation Endpoints

  • Query the broken references using:
  SELECT conversation_handle, conversation_id, is_initiator 
  FROM sys.conversation_endpoints 
  WHERE conversation_group_id NOT IN (SELECT conversation_group_id FROM sys.conversation_groups);
  • Note down the conversation_handle values returned, as these are the invalid endpoints causing Error 9710.

Step 3: End the Orphaned Conversations

  • For each conversation_handle identified in Step 2, terminate the conversation forcibly:
  END CONVERSATION 'conversation_handle_value' WITH CLEANUP;
  • If WITH CLEANUP fails due to the missing group, use END CONVERSATION 'conversation_handle_value' WITH ERROR = 9711 DESCRIPTION = 'Cleanup Invalid Group'; to force removal.

Step 4: Rebuild Broker Instance (If Corruption Persists)

  • If errors continue after cleanup, disable and re-enable the Service Broker to reset the internal GUID mapping:
  ALTER DATABASE YourDatabaseName SET DISABLE_BROKER;
  ALTER DATABASE YourDatabaseName SET ENABLE_BROKER;
  • Note: This clears pending conversation groups and should be performed during a maintenance window on Windows Server 2025 due to potential locking behavior in this build.

Alternative or Verification Steps

  • Verify the fix: Re-run the query from Step 2. If it returns zero rows, the orphaned references have been successfully cleared.
  • Alternative solution: If the error persists across restarts, restore the Service Broker-enabled database from the last known good backup taken before the corruption event, ensuring ENABLE_BROKER is set post-restore.