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

Troubleshooting Guide: SQL Server Error 9608

Error Message: The conversation priority with ID %d is referencing the missing service contract with ID %d.

Why This Error Happens

This error occurs when a Service Broker conversation priority object references a service contract that has been dropped from the database while the priority definition still points to its internal ID. This typically happens after an incomplete schema migration, a manual DROP CONTRACT statement executed without first cleaning up dependent priorities, or metadata corruption within the Service Broker catalog views. SQL Server 2025 validates these cross-references during conversation setup, and a broken link prevents the Broker from resolving the correct priority level for message delivery.

Step-by-Step Resolution Guide

Step 1: Identify the Orphaned Conversation Priority

  • Open SQL Server Management Studio (SSMS) and connect to the affected instance on Windows Server 2025 / Windows 11.
  • Run the following query to locate the broken reference:
  SELECT cp.conversation_priority_id, cp.name, cp.contract_id
  FROM sys.conversation_priorities cp
  LEFT JOIN sys.service_contracts sc ON cp.contract_id = sc.service_contract_id
  WHERE cp.contract_id IS NOT NULL AND sc.service_contract_id IS NULL;
  • Note the conversation_priority_id and contract_id values returned, matching the IDs in the error message.

Step 2: Drop and Recreate the Broken Priority

  • Script out the existing priority settings before removal, including LOCAL_SERVICE_NAME, REMOTE_SERVICE_NAME, and PRIORITY_LEVEL.
  • Drop the orphaned priority using:
  DROP BROKER PRIORITY [PriorityName];
  • Recreate it pointing to a valid, existing contract:
  CREATE BROKER PRIORITY [PriorityName]
  FOR CONVERSATION
  SET (CONTRACT_NAME = [ValidContractName],
       LOCAL_SERVICE_NAME = [ServiceName],
       PRIORITY_LEVEL = 5);

Step 3: Recreate the Missing Service Contract (If Required)

  • If the referenced contract was dropped in error, restore it using the original message types:
  CREATE CONTRACT [ContractName]
  ([MessageTypeName] SENT BY INITIATOR);
  • Re-link any dependent services using ALTER SERVICE if the contract is still used elsewhere in the Broker topology.

Step 4: Validate Service Broker Catalog Consistency

  • Run DBCC CHECKDB (YourDatabaseName) WITH DATA_PURITY; to rule out underlying metadata corruption.
  • Check the SQL Server error log (located at C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Log\) for related Broker warnings around the same timestamp.

Alternative or Verification Steps

  • Re-run the query from Step 1 — if it returns zero rows, the orphaned reference has been successfully resolved.
  • If the issue persists after recreating objects, restore the Service Broker configuration from a known-good database backup taken prior to the contract deletion, then reapply any schema changes incrementally.