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

Troubleshooting Guide: SQL Server Error 11224 – Service Broker Conversation Conflict

Why This Error Happens

Error 11224 occurs within SQL Server’s Service Broker when a message is sent to an endpoint that is already engaged in an active conversation with the same service instance, violating the single-conversation-per-dialog rule. This typically happens due to duplicate or orphaned Service Broker conversations that were not properly ended, often caused by application logic that fails to call END CONVERSATION, or by network interruptions that leave stale dialog handles active. Corrupted or mismatched Service Broker routing configurations on Windows Server 2025 can also trigger this conflict when multiple service program instances attempt to bind to the same endpoint simultaneously.

Step-by-Step Resolution Guide

Step 1: Identify Active and Orphaned Conversations

  • Open SQL Server Management Studio (SSMS) and connect to the affected instance.
  • Run the following query to inspect active dialogs:
  SELECT * FROM sys.conversation_endpoints WHERE state NOT IN ('CD');
  • Look for conversations stuck in CO (Conversing) or DI (Disconnected Inbound) states that correspond to the reported endpoint.

Step 2: Terminate Stale Conversations

  • For each problematic conversation handle identified, manually end it using:
  END CONVERSATION 'conversation_handle_guid' WITH CLEANUP;
  • Restart the SQL Server Service Broker service for the affected database:
  ALTER DATABASE [YourDatabase] SET ENABLE_BROKER WITH ROLLBACK IMMEDIATE;

Step 3: Review Application-Level Conversation Handling

  • Check the application code (stored procedures or external service programs) for logic that reuses conversation handles without properly closing them via END CONVERSATION.
  • Ensure the application implements a single-instance listener pattern on the target queue to prevent two service program instances from binding to the same endpoint concurrently.
  • Verify the Windows Server 2025 firewall and TCP/IP settings (via netsh advfirewall or Windows Defender Firewall settings) are not causing duplicate retry attempts due to dropped acknowledgments.

Step 4: Clear and Rebuild Broker Queues if Necessary

  • If stale messages persist, disable and re-enable the broker on the database:
  ALTER DATABASE [YourDatabase] SET DISABLE_BROKER;
  ALTER DATABASE [YourDatabase] SET ENABLE_BROKER;
  • Confirm the Service Broker GUID is regenerated correctly by checking sys.databases for the service_broker_guid column.

Alternative or Verification Steps

  • To verify the fix, send a test message between the two services and confirm it processes without triggering Error 11224 in the SQL Server error log located at C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Log\ERRORLOG.
  • If the issue persists, consider implementing a conversation group lock check in your application code to serialize access to the endpoint, preventing concurrent service program instances from initiating simultaneous dialogs.

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

Troubleshooting Guide: SQL Server Error 11223 — Service Broker Contract Mismatch

Why This Error Happens

This error occurs when a Service Broker message is sent using a service contract name that does not match the contract name bound to the existing conversation endpoint, typically because the sending application or stored procedure referenced an incorrect or outdated contract during a SEND operation. It can also arise after a service or contract has been altered or dropped and recreated with a different name, leaving stale conversation handles that still point to the old contract definition. In some cases, this is caused by mismatched Service Broker route or service definitions between the initiating and target databases, especially after a migration to SQL Server 2025 on Windows Server 2025.

Step-by-Step Resolution Guide

Step 1: Identify the Mismatched Contract and Conversation Endpoint

  • Query sys.conversation_endpoints to find the conversation handle generating the error:
  SELECT conversation_handle, service_contract_name, far_service, state_desc
  FROM sys.conversation_endpoints;
  • Cross-reference the service_contract_name column with the contract name used in your application’s SEND statement.
  • Note the exact contract names reported in the error message (both the message’s contract and the endpoint’s contract).

Step 2: Verify Service and Contract Definitions

  • Run the following to confirm the current contract bound to the service:
  SELECT s.name AS service_name, c.name AS contract_name
  FROM sys.services AS s
  JOIN sys.service_contract_usages AS scu ON s.service_id = scu.service_id
  JOIN sys.service_contracts AS c ON scu.service_contract_id = c.service_contract_id;
  • Confirm that the contract referenced in your BEGIN DIALOG CONVERSATION ... ON CONTRACT statement matches the one currently bound to the target service.
  • If the service was recently altered, update the application code or stored procedure to reference the correct, current contract name.

Step 3: End Stale Conversations and Restart the Dialog

  • Terminate any conversations using the outdated contract reference:
  END CONVERSATION 'conversation_handle_here' WITH CLEANUP;
  • Restart the dialog using BEGIN DIALOG CONVERSATION with the correct, verified contract name on both the initiator and target databases.
  • Ensure both databases involved in the conversation (especially in cross-database or cross-instance Broker setups) have synchronized contract and message type definitions.

Step 4: Rebuild Service Broker Objects if Corruption Is Suspected

  • If contract definitions appear inconsistent or corrupted, drop and recreate the service, contract, and message type objects in the correct dependency order:
  DROP SERVICE [YourServiceName];
  DROP CONTRACT [YourContractName];
  DROP MESSAGE TYPE [YourMessageType];
  • Recreate them using a single, version-controlled script to avoid future naming mismatches.
  • Re-enable Service Broker on the database if it was disabled during this process:
  ALTER DATABASE [YourDatabase] SET ENABLE_BROKER;

Alternative or Verification Steps

  • After applying fixes, send a test message through the corrected dialog and confirm it is received without errors by checking sys.transmission_queue for stuck or failed messages (an empty result indicates successful delivery).
  • If the issue persists across a linked or mirrored environment, verify that Service Broker routes (sys.routes) and remote service bindings use identical contract names on all participating SQL Server 2025 instances.

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

Troubleshooting Guide: SQL Server Error 11222 — Service Broker TO Service Name Mismatch

Why This Error Happens

Error 11222 occurs when Service Broker detects that the TO Service Name specified in an incoming message does not match the TO Service Name originally recorded on the conversation endpoint when the dialog was established. This typically happens due to conversation handle reuse errors, application logic that incorrectly constructs a new message against a stale or unrelated endpoint, or corruption/mismatch in the sys.conversation_endpoints metadata caused by replication, mirroring, or improper endpoint cleanup. It can also surface when routing configurations or service broker GUIDs change after a database restore, causing message routing to resolve to an endpoint that no longer matches the service contract.

Step-by-Step Resolution Guide

Step 1: Identify the Affected Conversation Endpoints

  • Run the following query to locate the problematic conversation handles:
  SELECT conversation_handle, far_service, service_name, state_desc 
  FROM sys.conversation_endpoints 
  WHERE state_desc <> 'CLOSED';
  • Cross-reference far_service with the TO Service Name reported in the error message text to confirm the mismatch.
  • Check SQL Server Error Log (C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Log\ERRORLOG) for repeated occurrences and timestamps correlating with application activity.

Step 2: Validate Application Code for Conversation Handle Reuse

  • Audit the application or stored procedure logic (commonly in SEND ON CONVERSATION statements) to ensure a new BEGIN DIALOG CONVERSATION is issued per unique target service rather than reusing a cached conversation handle.
  • Confirm that conversation handles are not being persisted across sessions or threads in multi-threaded .NET or Service Broker listener applications.
  • Review any custom routing tables via sys.routes to ensure the ADDRESS and SERVICE NAME values align with the actual broker service definitions.

Step 3: Clean Up Stale or Corrupted Conversation Endpoints

  • End any orphaned or inconsistent conversations manually:
  END CONVERSATION 'conversation_handle_guid' WITH CLEANUP;
  • Restart the affected Service Broker queue to clear cached routing information:
  ALTER QUEUE [QueueName] WITH STATUS = OFF;
  ALTER QUEUE [QueueName] WITH STATUS = ON;
  • If the issue surfaced after a database restore or mirroring failover, regenerate the Service Broker GUID only if necessary using ALTER DATABASE [DBName] SET NEW_BROKER WITH ROLLBACK IMMEDIATE (use with caution, as this breaks all existing conversations).

Step 4: Verify Service and Contract Definitions

  • Confirm that sys.services and sys.service_contracts have matching, non-ambiguous service names across all participating databases.
  • Ensure no duplicate service names exist on the same broker instance, which can cause SQL Server to resolve the TO Service Name to the wrong endpoint.
  • On Windows Server 2025/Windows 11 hosts, verify no network-level load balancer or proxy is duplicating/rewriting TDS packets in a way that scrambles Service Broker message routing.

Alternative or Verification Steps

  • After applying fixes, enable Service Broker diagnostic tracing using Extended Events (sqlserver.broker_conversation and sqlserver.broker_message_classify) to confirm new conversations resolve to the correct TO Service Name without errors.
  • If the error persists despite clean endpoints, consider dropping and recreating the affected Service Broker service and queue objects entirely, then re-test message delivery with a fresh BEGIN DIALOG CONVERSATION to rule out residual metadata corruption.

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

Troubleshooting Guide: Error 11221 — Service Broker Message Header Inconsistency

Why This Error Happens

Error 11221 occurs when SQL Server’s Service Broker attempts to deliver a message but detects that the message header does not conform to the expected binary structure. This is typically caused by network-level packet corruption, a mismatched or outdated Service Broker endpoint configuration between the sending and receiving instances, or TCP packet fragmentation issues introduced by firewalls, load balancers, or antivirus software inspecting traffic on the Broker port. In rarer cases, it stems from a corrupted transmission queue or a version mismatch between SQL Server instances communicating over Service Broker dialogs.

Step-by-Step Resolution Guide

Step 1: Verify Service Broker Endpoint Configuration

  • Run SELECT * FROM sys.service_broker_endpoints; on both the sending and receiving SQL Server 2025 instances to confirm the endpoint state is STARTED.
  • Confirm the TRANSPORT settings (TCP port, encryption algorithm) match on both sides — mismatched encryption (AES vs. RC4) is a common trigger.
  • Check that the port (default 4022) isn’t being intercepted or rewritten by a firewall or NAT device: Get-NetFirewallRule -DisplayName "*Service Broker*" in PowerShell.

Step 2: Inspect and Clear the Transmission Queue

  • Query sys.transmission_queue to identify stuck or malformed messages: SELECT * FROM sys.transmission_queue;
  • If corrupted entries are found, back up the affected database, then end the conversation causing the issue using END CONVERSATION <handle> WITH CLEANUP;
  • Restart the SQL Server Service Broker on the affected database:
  ALTER DATABASE [YourDB] SET DISABLE_BROKER;
  ALTER DATABASE [YourDB] SET ENABLE_BROKER;

Step 3: Disable Deep Packet Inspection on Network Security Tools

  • On Windows Server 2025, open Windows Defender Firewall with Advanced Security and create an explicit allow rule for port 4022 without inspection.
  • If using a third-party antivirus or a network appliance performing SSL/TCP inspection, add an exception for SQL Server Service Broker traffic, as packet rewriting corrupts the binary message header.
  • Validate using netstat -ano | findstr 4022 to ensure the connection remains stable and isn’t being reset mid-transmission.

Step 4: Update SQL Server 2025 Cumulative Updates

  • Check your current build with SELECT @@VERSION; and compare against the latest Cumulative Update (CU) from Microsoft’s official release notes.
  • Apply the latest CU, as known Service Broker header-parsing bugs are frequently patched in cumulative updates.
  • Reboot the Windows Server 2025 instance after patching to ensure the Broker service fully reinitializes.

Alternative or Verification Steps

  • To verify the fix, send a test message between the two endpoints using SEND ON CONVERSATION and confirm it appears correctly in the target queue without triggering Error 11221 in the SQL Server error log.
  • If the issue persists, drop and recreate the Service Broker routes and endpoints entirely (DROP ROUTE / CREATE ROUTE) rather than reconfiguring, since stale metadata can silently reintroduce header mismatches.

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

Troubleshooting Guide: Error 11220 – SQL Server Service Broker Message Delivery Failure

Why This Error Happens

This error occurs when SQL Server’s Service Broker attempts to deliver a message to a target broker instance that no longer exists or was never properly established, typically because the destination queue, service, or conversation endpoint was dropped while messages were still in transit. It can also result from a mismatched or corrupted routing configuration, where the SYS.ROUTES table points to an endpoint that is unreachable or has since been reconfigured. In some cases, this stems from a conversation that was forcibly ended on one side without properly closing the dialog on the other, leaving orphaned messages in the transmission queue.

Step-by-Step Resolution Guide

Step 1: Verify the Broker Service and Queue Status

  • Open SQL Server Management Studio (SSMS) and connect to the affected instance.
  • Run SELECT * FROM sys.service_broker_endpoints; to confirm the endpoint is active and listening.
  • Check SELECT * FROM sys.transmission_queue; to identify stuck messages and note the conversation_handle and to_service_name.

Step 2: Inspect and Repair Broker Routing Configuration

  • Query SELECT * FROM sys.routes; to confirm the target service route exists and points to a valid address.
  • If the route is missing or stale, recreate it using:
  CREATE ROUTE TargetRoute
  WITH SERVICE_NAME = 'TargetServiceName',
  ADDRESS = 'TCP://TargetServer:4022';
  • Ensure the TargetServiceName matches exactly (case-sensitive) with the service defined via CREATE SERVICE on the destination instance.

Step 3: Validate Service and Queue Existence on Target Instance

  • On the target SQL Server 2025 instance, run SELECT * FROM sys.services; to confirm the service referenced in the error still exists.
  • If the service was dropped, recreate it and bind it to the correct queue:
  CREATE SERVICE TargetServiceName
  ON QUEUE TargetQueue
  (ContractName);
  • Restart the SQL Server service via services.msc or Restart-Service MSSQLSERVER in PowerShell (run as Administrator) to force Broker to reinitialize endpoint bindings.

Step 4: Clear Orphaned Messages from the Transmission Queue

  • Identify the problematic conversation handle from Step 1 and end it manually:
  END CONVERSATION 'conversation_handle_here' WITH CLEANUP;
  • This removes stuck messages that reference the now-missing broker instance, preventing repeated 11220 errors in the SQL Server error log.

Alternative or Verification Steps

  • To verify the fix, re-run the original stored procedure or application process that triggers message sending, then check sys.transmission_queue to confirm it remains empty with no new 11220 entries in the SQL Server Error Log (via EXEC sp_readerrorlog).
  • If the issue persists, as an alternative, disable and re-enable Service Broker on the database entirely using ALTER DATABASE YourDB SET DISABLE_BROKER; followed by ALTER DATABASE YourDB SET ENABLE_BROKER; to force a full reset of all broker instance bindings.

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

Troubleshooting Guide: SQL Server Error 11219 – Message Delivery Failure (Disabled Queue)

Why This Error Happens

Error 11219 occurs in SQL Server Service Broker when a message attempts to arrive at a queue that has been administratively disabled via the STATUS = OFF setting or automatically disabled due to a poison message detection. This typically happens after repeated transaction rollbacks caused by unhandled exceptions in the activation stored procedure, which triggers SQL Server’s “poison message” protection mechanism. Corrupted queue metadata or manual intervention by a DBA that disabled the queue without re-enabling it can also cause this symptom.

Step-by-Step Resolution Guide

Step 1: Identify the Disabled Queue

  • Run the following query to locate the specific Queue ID referenced in the error message:
  • SELECT object_id, name, is_receive_enabled, is_enqueue_enabled FROM sys.service_queues WHERE object_id = <Queue_ID>;
  • Check the is_receive_enabled and is_enqueue_enabled columns; a value of 0 confirms the queue is disabled.

Step 2: Check for Poison Message Triggers

  • Query the SQL Server Error Log or Windows Event Viewer (Applications and Services Logs > MSSQLSERVER) to check for repeated rollback errors immediately preceding the 11219 error.
  • Look for errors indicating “The activated proc… failed” which usually precedes an auto-disable event.
  • If poison message handling triggered this, you must fix the underlying T-SQL logic in the activation stored procedure before re-enabling the queue to prevent an immediate loop.

Step 3: Re-Enable the Service Broker Queue

  • Execute an ALTER QUEUE command to bring the queue back online. Replace YourQueueName with the actual object name retrieved in Step 1.
  • ALTER QUEUE YourQueueName WITH STATUS = ON;
  • Ensure you run this command within the context of the correct database using USE YourDatabaseName; prior to execution.

Step 4: Validate Service Broker Configuration

  • Verify that Service Broker is enabled for the specific database, as a disabled broker can sometimes manifest similarly to a disabled queue.
  • Run: SELECT is_broker_enabled FROM sys.databases WHERE name = 'YourDatabaseName';
  • If the result is 0, enable it using: ALTER DATABASE YourDatabaseName SET ENABLE_BROKER;

Alternative or Verification Steps

  • Verify the Fix: Re-run the SELECT * FROM sys.service_queues query from Step 1 to confirm is_receive_enabled now shows a value of 1, and monitor the queue using SELECT * FROM YourQueueName to ensure messages are being consumed correctly.
  • Alternative Solution: If the queue immediately disables again after re-enabling, isolate the activation procedure by setting ACTIVATION (STATUS = OFF) temporarily, manually drain the queue of poison messages, and restart the stored procedure logic separately to debug the exception handling (TRY/CATCH blocks).

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

Microsoft SQL Server 2025 — Error 11218 Troubleshooting Guide

Why This Error Happens

Error 11218 occurs in SQL Server Service Broker when a message is received that duplicates one already present in the conversation’s receive queue, typically due to a network retry, a conversation timer retransmission, or an interrupted acknowledgment cycle between endpoints. This is often triggered by unstable network connectivity between the initiator and target databases, overlapping or misconfigured Service Broker routes, or a backlog in the transmission queue caused by a stalled or disabled queue reader. In most cases, the underlying message is still delivered correctly once, and the duplicate is simply being dropped as designed — but frequent occurrences point to an unhealthy dialog or endpoint configuration.

Step-by-Step Resolution Guide

Step 1: Verify Service Broker Status and Queue Health

  • Open SQL Server Management Studio (SSMS) and connect to the affected instance on Windows Server 2025 / Windows 11.
  • Run SELECT is_broker_enabled FROM sys.databases WHERE name = 'YourDatabaseName'; to confirm Service Broker is active.
  • Check sys.transmission_queue for stuck or looping messages: SELECT * FROM sys.transmission_queue;
  • Inspect sys.conversation_endpoints for conversations stuck in DISCONNECTED_INBOUND or ERROR states.

Step 2: Inspect Network Stability Between Endpoints

  • Use ping and tracert between the initiator and target SQL Server instances to rule out packet loss or latency spikes.
  • Confirm the TCP port used by Service Broker endpoints (commonly 4022) is open and not blocked by Windows Defender Firewall:
  • Path: Control Panel > System and Security > Windows Defender Firewall > Advanced Settings > Inbound Rules
  • Validate the endpoint configuration with SELECT * FROM sys.service_broker_endpoints; to ensure the correct port and state (STARTED).

Step 3: Clear and Reset the Affected Queue

  • Disable then re-enable the queue to force a clean reset:
  • ALTER QUEUE YourQueueName WITH STATUS = OFF;
  • ALTER QUEUE YourQueueName WITH STATUS = ON;
  • If duplicates persist, end the problematic conversation manually:
  • END CONVERSATION 'conversation_handle' WITH CLEANUP;
  • Restart the SQL Server Service Broker task via SQL Server Configuration Manager if the queue remains unresponsive.

Step 4: Update SQL Server 2025 and Review Patch Level

  • Open SQL Server Configuration Manager or run SELECT @@VERSION; to confirm the current build.
  • Apply the latest Cumulative Update (CU) from Microsoft, as Service Broker message-handling fixes are frequently included in servicing updates.
  • Reboot the Windows Server 2025 / Windows 11 host after patching to ensure all broker-related services reinitialize cleanly.

Alternative or Verification Steps

  • After applying the fixes, monitor sys.transmission_queue and the SQL Server Error Log for recurrence of Error 11218 over a 24-hour window to confirm resolution.
  • If the issue persists, enable Service Broker trace flags (e.g., trace flag 9950-series diagnostics) or use Extended Events to capture broker_message_classify events for deeper root-cause analysis.

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

Troubleshooting Guide: SQL Server Error 11217 – Message Out of Sequence

Why This Error Happens

Error 11217 occurs in Service Broker when a dialog conversation receives a message whose sequence number does not match the expected receive sequence on the queue, typically due to message corruption, network packet reordering, or a damaged conversation endpoint. This can also happen if the underlying Service Broker queue or conversation state became desynchronized after a failover, restore operation, or abrupt transaction rollback. In some cases, corrupted transmission queue data or an inconsistent database state after an unexpected shutdown is the root cause.

Step-by-Step Resolution Guide

Step 1: Identify the Affected Conversation and Queue

  • Run SELECT * FROM sys.conversation_endpoints WHERE state_desc <> 'CONVERSING'; to locate endpoints in an error or inconsistent state.
  • Check sys.transmission_queue for stuck or malformed messages tied to the conversation handle referenced in the error.
  • Note the Conversation Group ID and Handle for further investigation.

Step 2: End the Corrupted Conversation

  • Use END CONVERSATION 'conversation_handle' WITH CLEANUP; to forcibly terminate the broken dialog.
  • This clears the out-of-sequence state without requiring a full database restart.
  • Confirm the queue is clear afterward with SELECT COUNT(*) FROM YourQueueName;.

Step 3: Validate Service Broker Configuration

  • Verify Service Broker is enabled: SELECT is_broker_enabled FROM sys.databases WHERE name = 'YourDatabaseName';
  • If disabled or inconsistent, re-enable with ALTER DATABASE YourDatabaseName SET ENABLE_BROKER;
  • Ensure Windows Server 2025 firewall rules allow the Service Broker endpoint port (commonly 4022) under Windows Defender Firewall > Advanced Settings > Inbound Rules.

Step 4: Run Database Consistency Checks

  • Execute DBCC CHECKDB('YourDatabaseName') WITH NO_INFOMSGS, ALL_ERRORMSGS; to rule out underlying corruption.
  • Review the SQL Server Error Log (via SSMS or %ProgramFiles%\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Log\) for related I/O or storage warnings.

Step 5: Restart the Service Broker Task

  • Disable and re-enable the broker to force a clean restart of message processing:
  • ALTER DATABASE YourDatabaseName SET DISABLE_BROKER; ALTER DATABASE YourDatabaseName SET ENABLE_BROKER;
  • Monitor sys.dm_broker_activated_tasks to confirm tasks resume normally.

Alternative or Verification Steps

  • Verify the fix by sending a test message through the affected conversation and confirming it processes without triggering Error 11217 again in the SQL Server Error Log.
  • If the issue persists, restore the database from a known good backup taken before the corruption occurred, then reapply transactions via transaction log backups if available.

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

Troubleshooting Guide: SQL Server Error 11216 – Message Delivery Conflict

Why This Error Happens

Error 11216 occurs when Service Broker attempts to deliver a message to an activated stored procedure, but another task is already processing a message on the same conversation group. This typically happens due to conversation group locking contention, orphaned or stalled activation procedures that haven’t released their lock, or a backlog in the Service Broker queue caused by misconfigured MAXQUEUEREADERS settings. In high-concurrency environments, this can also stem from poison message handling delays or blocked transactions holding conversation group locks longer than expected.

Step-by-Step Resolution Guide

Step 1: Identify Blocking Sessions and Conversation Group Locks

  • Open SQL Server Management Studio (SSMS) and connect to the instance.
  • Run the following query to check for active locks on conversation groups:
  SELECT * FROM sys.dm_tran_locks WHERE resource_type = 'SERVICE BROKER CONVERSATION GROUP';
  • Cross-reference the request_session_id with sys.dm_exec_requests to identify long-running or stalled sessions.
  • Note any session IDs that have been holding the lock for an unusually long time (over 60 seconds under normal load).

Step 2: Review and Adjust Queue Activation Settings

  • Navigate to the affected queue properties via: Databases > [YourDB] > Service Broker > Queues > [QueueName] > Properties.
  • Check the MAX_QUEUE_READERS value; if set too high relative to available worker threads, lower it to match realistic concurrency (e.g., 5-10 for most workloads).
  • Verify the activation stored procedure does not contain a long-running WAITFOR or open transaction that fails to commit/rollback promptly.
  • Update the queue using T-SQL if needed:
  ALTER QUEUE [YourQueueName] WITH ACTIVATION (MAX_QUEUE_READERS = 5);

Step 3: Clear Poison Messages and Restart the Queue

  • Check if the queue has been disabled due to poison message detection:
  SELECT is_receive_enabled, is_enqueue_enabled FROM sys.service_queues WHERE name = 'YourQueueName';
  • If disabled, re-enable the queue manually:
  ALTER QUEUE [YourQueueName] WITH STATUS = ON;
  • Kill any orphaned sessions identified in Step 1 using KILL [session_id] only after confirming they are not part of a critical active transaction.

Step 4: Restart the SQL Server Service Broker Component

  • Open Services.msc on Windows Server 2025 / Windows 11.
  • Restart the SQL Server (MSSQLSERVER) service to flush any stuck internal Broker tasks (schedule downtime accordingly).
  • Alternatively, run a targeted Broker restart via T-SQL without a full service restart:
  ALTER DATABASE [YourDB] SET DISABLE_BROKER;
  ALTER DATABASE [YourDB] SET ENABLE_BROKER;

Alternative or Verification Steps

  • To verify the fix, send a test message through the affected Service Broker queue and monitor sys.transmission_queue to confirm it clears without generating a new Error 11216 entry.
  • If the issue persists, enable Service Broker diagnostic trace flags (2537) temporarily to capture deeper telemetry on conversation group contention during peak load.

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

Troubleshooting Guide: SQL Server Error 11215 – Service Broker Send Permission Denied

Why This Error Happens

Error 11215 occurs when a database user attempts to send a message to a Service Broker service but lacks the explicit SEND permission on that service object. This is common after a database restore, migration, or when a new login/user is mapped without re-establishing Service Broker-specific grants, since SEND permissions are not inherited through standard database role memberships like db_owner in all contexts. It can also surface when the service name referenced in the BEGIN DIALOG CONVERSATION statement has been altered, dropped, and recreated, causing stale permission mappings tied to the old object ID.

Step-by-Step Resolution Guide

Step 1: Identify the User and Service Involved

  • Note the User ID and Database ID from the error message text.
  • Run the following query against the affected database to resolve the IDs to names:
SELECT USER_NAME(<user_id>) AS UserName, DB_NAME(<database_id>) AS DatabaseName;
  • Cross-reference the service name provided in the error (the %.*ls placeholder) with sys.services to confirm it exists and is active.

Step 2: Grant SEND Permission on the Service

  • Connect to the target database using SQL Server Management Studio (SSMS) or sqlcmd on Windows Server 2025.
  • Execute the grant statement using the exact service name identified in Step 1:
GRANT SEND ON SERVICE::[YourServiceName] TO [YourUserName];
  • If the user sends messages via a stored procedure under a different execution context, ensure the permission is granted to the correct proxy user, not just the login.

Step 3: Verify the Service and Contract Configuration

  • Check sys.service_permissions to confirm the grant was successfully applied:
SELECT * FROM sys.service_permissions WHERE major_id = (SELECT service_id FROM sys.services WHERE name = 'YourServiceName');
  • Ensure the Service Broker is enabled on the database by checking the is_broker_enabled flag in sys.databases; if it is 0, enable it using ALTER DATABASE [YourDB] SET ENABLE_BROKER;.

Step 4: Restart the SQL Server Service Broker Task (If Necessary)

  • If permissions were granted but the error persists due to cached execution plans, restart the SQL Server Service via the Windows Services console (services.msc) on Windows Server 2025.
  • Alternatively, run ALTER DATABASE [YourDB] SET NEW_BROKER WITH ROLLBACK IMMEDIATE; only if conversation history is not critical, as this resets the Broker conversation handles.

Alternative or Verification Steps

  • To verify the fix, have the application resend the specific message; monitor the SQL Server Error Log via Event Viewer (Windows Logs > Application) to confirm Event ID 11215 no longer triggers.
  • If the error continues despite granted permissions, check for a DENY SEND statement that may be explicitly blocking the user, as DENY overrides GRANT in SQL Server’s permission hierarchy.

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

Troubleshooting Guide: SQL Server Error 11214 — Contract Not Found in Service Broker

Why This Error Happens

Error 11214 occurs when a Service Broker initiator tries to begin a dialog conversation using a contract name that either does not exist on the target service, or exists but was never explicitly granted to the service definition. This commonly happens after a database restore or migration where contract bindings were not recreated, or when the contract name referenced in BEGIN DIALOG CONVERSATION contains a typo, schema mismatch, or case-sensitivity issue. It can also occur if the target service was altered to accept a different set of contracts, leaving old message routes orphaned.

Step-by-Step Resolution Guide

Step 1: Verify the Contract Exists in the Target Database

  • Run the following query against the target database to confirm the contract is actually present:
  • SELECT name FROM sys.service_contracts WHERE name = 'YourContractName';
  • If no rows are returned, the contract was never created or was dropped during a migration/restore.
  • Check for schema-qualification issues — Service Broker object names are case-sensitive in some collations, so confirm exact casing matches the definition used in your application code.

Step 2: Confirm the Service Accepts the Contract

  • Query sys.service_contract_usages joined with sys.services to check which contracts a given service is bound to:
  • SELECT s.name AS ServiceName, c.name AS ContractName FROM sys.services s JOIN sys.service_contract_usages u ON s.service_id = u.service_id JOIN sys.service_contracts c ON u.service_contract_id = c.service_contract_id;
  • If the contract is missing from this list, the service was created without ON CONTRACT clause referencing it, or it was never added.
  • Recreate or alter the service to include the correct contract:
  • ALTER SERVICE [YourServiceName] (ADD CONTRACT [YourContractName]);

Step 3: Rebuild Missing Broker Objects

  • If the contract and message types were lost (common after a RESTORE DATABASE from an environment with a different Service Broker GUID), recreate them in the correct order:
  • CREATE MESSAGE TYPE [YourMessageType] VALIDATION = WELL_FORMED_XML;
  • CREATE CONTRACT [YourContractName] ([YourMessageType] SENT BY INITIATOR);
  • ALTER SERVICE [YourServiceName] (ADD CONTRACT [YourContractName]);
  • Ensure the Service Broker GUID matches expectations using SELECT service_broker_guid FROM sys.databases WHERE name = 'YourDB'; — mismatched GUIDs after restore can cause routing to silently fail even if contracts look correct locally.

Step 4: Check Routing and Remote Service Bindings (For Cross-Database/Cross-Server Scenarios)

  • On Windows Server 2025 instances using cross-instance Service Broker, verify the route and remote binding reference the correct service name and contract:
  • SELECT * FROM sys.routes;
  • SELECT * FROM sys.remote_service_bindings;
  • Confirm the target endpoint is listening and not blocked by Windows Firewall — check Windows Defender Firewall with Advanced Security for an inbound rule allowing the Service Broker TCP port (default 4022).

Alternative or Verification Steps

  • After applying fixes, resend a test message using BEGIN DIALOG CONVERSATION and SEND ON CONVERSATION, then check sys.transmission_queue — it should be empty, meaning the message delivered without errors instead of showing the 11214 entry.
  • If the issue persists only in specific databases, consider dropping and fully recreating the Service Broker service/contract chain from scratch rather than patching individual objects, since partial object corruption from restores can leave hidden metadata inconsistencies not visible via standard catalog views.

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

Troubleshooting Guide: SQL Server Error 11213 (Service Broker Conversation Error)

Why This Error Happens

Error 11213 occurs when the Service Broker message ordering sequence is violated, typically because a message was received or processed out of order at the endpoint. This often happens due to corrupted conversation state in the sys.conversation_endpoints catalog view, network packet reordering between dialog endpoints, or an application incorrectly attempting to reuse a conversation handle after an error. In most cases, the underlying dialog has entered an inconsistent state and SQL Server rejects the message to preserve transactional integrity.

Step-by-Step Resolution Guide

Step 1: Verify the Conversation Endpoint State

  • Run the following query to inspect the current state of the conversation:
SELECT conversation_handle, state, state_desc, is_initiator 
FROM sys.conversation_endpoints;
  • Look for endpoints stuck in ER (Error) or DI (Disconnected Inbound) states, as these indicate a broken message sequence.
  • Note the conversation_handle GUID for any affected conversations for use in later steps.

Step 2: End and Clean Up Corrupted Conversations

  • Terminate the broken conversation explicitly rather than letting it retry indefinitely:
END CONVERSATION 'conversation_handle_GUID' WITH CLEANUP;
  • If multiple conversations are affected, consider ending all conversations in the ER state using a cursor-based loop.
  • Restart the Service Broker on the affected database to reset internal queue monitors:
ALTER DATABASE [YourDatabaseName] SET DISABLE_BROKER;
ALTER DATABASE [YourDatabaseName] SET ENABLE_BROKER;

Step 3: Check for Network-Level Message Reordering

  • On Windows Server 2025, open Server Manager > Local Server > NIC Properties and verify that TCP Chimney Offload and RSS (Receive Side Scaling) are not causing out-of-order packet delivery.
  • Run netsh int tcp show global in an elevated PowerShell prompt to confirm chimney and rss settings are consistent across both endpoint machines.
  • Disable any aggressive load balancers or NAT devices sitting between the two SQL Server instances, as they can reorder TCP segments carrying Service Broker traffic.

Step 4: Review Application-Side Message Handling

  • Audit the application code or stored procedure that sends Service Broker messages to ensure it uses RECEIVE in strict FIFO order and does not call SEND ON CONVERSATION with a stale or already-terminated handle.
  • Ensure the application wraps SEND and RECEIVE calls in proper transactions so partially committed messages aren’t retried out of sequence.
  • Update the application logic to catch error 11213 specifically and trigger a full conversation reset rather than retrying the same handle.

Alternative or Verification Steps

  • To verify the fix, send a test message through the same contract/service pair and confirm it is received via RECEIVE without generating an entry in sys.transmission_queue that references error 11213.
  • If the issue persists, enable Service Broker diagnostic tracing via Extended Events (sqlserver.broker_conversation and sqlserver.broker_message_classify) to capture the exact point of sequence failure for deeper root-cause analysis.

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

Troubleshooting Guide: SQL Server Error 11212 – Conversation Endpoint Already Closed

Why This Error Happens

This error occurs when Service Broker attempts to deliver a message to a conversation endpoint that has already transitioned to a CLOSED state, typically because the endpoint was ended prematurely via END CONVERSATION or timed out before the message delivery completed. This often results from a race condition between asynchronous message sends and conversation lifecycle management in the application code. It can also happen if error handling logic incorrectly closes conversations while messages are still in transit within the SQL Server 2025 Service Broker queue.

Step-by-Step Resolution Guide

Step 1: Inspect Service Broker Conversation State

  • Query sys.conversation_endpoints to check the current state and state_desc columns for the affected conversation_handle.
  • Run: SELECT conversation_handle, state_desc, far_service, lifetime FROM sys.conversation_endpoints;
  • Identify if endpoints are stuck in CD (Closed) or DI (Disconnected Inbound) states.

Step 2: Review Application-Level Conversation Handling

  • Check stored procedures or application code for premature calls to END CONVERSATION before all SEND operations complete.
  • Ensure BEGIN DIALOG CONVERSATION includes a LIFETIME value long enough to accommodate expected processing time (e.g., WITH LIFETIME = 3600).
  • Verify that error handlers in TRY...CATCH blocks aren’t triggering END CONVERSATION on transient failures.

Step 3: Enable Poison Message Handling and Diagnostics

  • Disable automatic poison message detection temporarily for debugging: ALTER QUEUE [YourQueueName] WITH POISON_MESSAGE_HANDLING (STATUS = OFF);
  • Capture Service Broker diagnostic events using Extended Events: create a session targeting broker_conversation and broker_message_classify events in SQL Server Management Studio (SSMS).
  • Review the sys.transmission_queue table for any pending messages with associated error text.

Step 4: Clean Up Orphaned Conversations

  • Manually close any stuck or orphaned conversation endpoints using: END CONVERSATION 'conversation_handle' WITH CLEANUP;
  • Restart the SQL Server Service Broker for the affected database if issues persist: ALTER DATABASE [YourDB] SET DISABLE_BROKER; ALTER DATABASE [YourDB] SET ENABLE_BROKER;
  • Confirm no active transactions are holding locks on the sys.conversation_endpoints table during cleanup.

Alternative or Verification Steps

  • Verify the fix by sending a test message through the affected service and confirming successful delivery without Error 11212 appearing in the SQL Server Error Log or Windows Event Viewer.
  • If the issue persists, consider re-architecting the application to use WAITFOR (RECEIVE ...) patterns with proper conversation group locking to prevent race conditions between message sends and conversation closures.

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

Troubleshooting Guide: SQL Server Error 11211 – Service Broker Message Dropped (Permission Denied)

Why This Error Happens

Error 11211 occurs within SQL Server Service Broker when an incoming message targets a database, but the user account associated with the message (often the guest account or a specific login mapped via a Service Broker route) lacks the CONNECT permission on that specific database. This is commonly triggered when the guest user is disabled in the target database, or when certificate-based Service Broker security grants authentication but not actual database-level connection rights. Additionally, if the database was recently restored or migrated in Windows Server 2025 environments, orphaned users or mismatched SIDs can cause the Service Broker endpoint to resolve to a user with revoked access.

Step-by-Step Resolution Guide

Step 1: Identify the Target Database and Message Origin

  • Open the SQL Server Error Log or Event Viewer and locate the full Error 11211 text to extract the Database ID and Message Origin values.
  • Run the following query to convert the Database ID to a readable name:
  SELECT DB_NAME(<Database_ID>) AS TargetDatabase;
  • Note the service name referenced in message origin to confirm which Service Broker endpoint is affected.

Step 2: Verify and Enable Guest Access (If Applicable)

  • Check whether the guest user is enabled in the target database, as Service Broker often relies on this for inter-database communication.
  • Run the following in SSMS (SQL Server Management Studio) connected to the target database:
  USE [TargetDatabaseName];
  GRANT CONNECT TO guest;
  • If organizational policy prohibits enabling guest, proceed to Step 3 to map an explicit user.

Step 3: Map the Service Broker Login to a Database User

  • Identify the login associated with the Service Broker certificate or route using:
  SELECT name, principal_id FROM sys.server_principals WHERE type = 'S';
  • Create a corresponding user in the target database and grant CONNECT permission explicitly:
  USE [TargetDatabaseName];
  CREATE USER [ServiceBrokerLogin] FOR LOGIN [ServiceBrokerLogin];
  GRANT CONNECT TO [ServiceBrokerLogin];
  • Ensure this user is also granted EXECUTE rights on the Service Broker message type/contract if a stored procedure activation is involved.

Step 4: Check for Orphaned Users (Post-Migration Scenarios)

  • On Windows Server 2025 instances where the database was restored from a backup, run the orphaned user detection query:
  EXEC sp_change_users_login 'Report';
  • Remap any orphaned SIDs using:
  EXEC sp_change_users_login 'Update_One', 'ServiceBrokerLogin', 'ServiceBrokerLogin';

Step 5: Restart the Service Broker and Validate Routing

  • Disable and re-enable Service Broker on the target database to force a refresh of internal permission caches:
  ALTER DATABASE [TargetDatabaseName] SET DISABLE_BROKER;
  ALTER DATABASE [TargetDatabaseName] SET ENABLE_BROKER;
  • Restart the SQL Server (MSSQLSERVER) service via services.msc on Windows Server 2025 to clear any cached authentication tokens.

Alternative or Verification Steps

  • After applying permissions, send a test message through the Service Broker queue and monitor sys.transmission_queue for the target database; a cleared queue confirms the message was delivered successfully.
  • If the error persists, verify that the SQL Server Service Account (visible in services.msc) has not been altered, as a changed service identity on Windows 11/Server 2025 can disrupt certificate-based Service Broker authentication entirely.

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

Troubleshooting Guide: SQL Server Error 11210 — Service Broker Message Dropped (TO Service Not Found)

Why This Error Happens

This error occurs when SQL Server’s Service Broker receives a message addressed to a target (TO) service that does not exist or is not properly registered in the destination database. This typically happens due to a mismatched or misspelled service name in the BEGIN DIALOG statement, a missing Service Broker service definition caused by an incomplete deployment script, or a routing configuration pointing to the wrong database or server instance. It can also occur after a database restore or migration where the Service Broker GUID changed but the route or remote service binding was not updated accordingly.

Step-by-Step Resolution Guide

Step 1: Verify the Service Broker Service Exists

  • Run the following query on the target database to confirm the service name is correctly registered:
SELECT name, service_id, service_queue_id 
FROM sys.services;
  • Compare the output against the exact service name referenced in the error message (case-sensitive and whitespace-sensitive).
  • If the service is missing, recreate it using CREATE SERVICE [ServiceName] ON QUEUE [QueueName].

Step 2: Check Routing and Broker Configuration

  • Inspect existing routes with:
SELECT * FROM sys.routes;
  • Confirm the address and service_name columns point to the correct instance and database.
  • If the database was restored or copied, verify the Service Broker GUID hasn’t changed unexpectedly:
SELECT name, service_broker_guid, is_broker_enabled 
FROM sys.databases 
WHERE name = 'YourDatabaseName';
  • Update or drop/recreate the route if the GUID is outdated using ALTER ROUTE or CREATE ROUTE.

Step 3: Validate Dialog and Contract Bindings

  • Check that the originating service, target service, and contract are all correctly bound:
SELECT * FROM sys.service_contracts;
SELECT * FROM sys.conversation_endpoints;
  • Ensure the application or stored procedure issuing BEGIN DIALOG CONVERSATION references the exact, current service name (watch for trailing spaces or outdated hardcoded values in legacy code).

Step 4: Restart the Service Broker Endpoint

  • If configuration looks correct but the error persists, toggle the broker off and on to force re-registration:
ALTER DATABASE [YourDatabaseName] SET DISABLE_BROKER;
GO
ALTER DATABASE [YourDatabaseName] SET ENABLE_BROKER;
GO
  • Confirm no active transactions are blocking this operation using sys.dm_tran_active_transactions before running it in production.

Step 5: Check for Firewall or Network Routing Issues (Windows Server 2025)

  • If messages are being dropped between instances, verify the Service Broker port (default 4022) is open:
Get-NetFirewallRule -DisplayName "*SQL Server Service Broker*"
  • Ensure Windows Defender Firewall on Windows Server 2025 / Windows 11 isn’t silently blocking inbound TCP traffic on the configured endpoint port.

Alternative or Verification Steps

  • To verify the fix, send a test message using SEND ON CONVERSATION and check sys.transmission_queue for the target database — if the row disappears without error, delivery succeeded.
  • If the issue persists, enable Service Broker trace flags (2537) temporarily or capture an Extended Events session on the broker_message_classify event to pinpoint exactly where message classification is failing.

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

Why This Error Happens

Error 11209 occurs when Service Broker receives a message for a conversation handle or dialog ID that no longer exists in the sys.conversation_endpoints table, typically because the conversation was already ended, timed out, or rolled back on the receiving end. This frequently happens due to orphaned conversations caused by application logic that fails to properly handle END CONVERSATION commands, or due to message retention settings sending traffic to a stale endpoint. It can also surface after a database restore or mirroring failover where conversation state became desynchronized between the initiator and target databases.

Step-by-Step Resolution Guide

Step 1: Identify the Source of the Orphaned Conversation

  • Run the following query to check for the conversation ID referenced in the error message:
  • SELECT * FROM sys.conversation_endpoints WHERE conversation_id = '<GUID-from-error>';
  • If no rows return, the conversation has already been terminated on this instance, confirming the message is arriving for a dead endpoint.
  • Check the SQL Server Error Log (via %ls origin field) to identify which remote service broker instance is sending the stale message.

Step 2: Clear Poison Messages from the Queue

  • Inspect the receiving queue for a backlog of undeliverable messages:
  • SELECT * FROM [YourQueueName] WHERE conversation_handle = '<handle>';
  • If messages are stuck, disable and re-enable the queue to clear the poison message flag:
  • ALTER QUEUE [YourQueueName] WITH STATUS = OFF;
  • ALTER QUEUE [YourQueueName] WITH STATUS = ON;
  • On Windows Server 2025, ensure the SQL Server Service Broker service account has not been affected by recent Group Policy changes restricting network service permissions.

Step 3: Resynchronize Service Broker Routing and Endpoints

  • Verify that routes and remote service bindings are still valid after any recent failover or restore:
  • SELECT * FROM sys.routes;
  • SELECT * FROM sys.remote_service_bindings;
  • Drop and recreate any routes pointing to outdated server instances or IP addresses (common after Windows Server 2025 network stack updates change adapter GUIDs).
  • Restart the SQL Server Broker task using:
  • ALTER DATABASE [YourDB] SET DISABLE_BROKER;
  • ALTER DATABASE [YourDB] SET ENABLE_BROKER;

Step 4: End Lingering Conversations Manually

  • For conversations still active locally but mismatched with the remote side, force termination to reset state:
  • END CONVERSATION '<conversation_handle>' WITH CLEANUP;
  • This clears corrupted or “zombie” conversation state without requiring a full database restart.

Alternative or Verification Steps

  • Verify the fix by monitoring the SQL Server Error Log and sys.conversation_endpoints for 24 hours to confirm Error 11209 no longer appears and queue depth remains stable.
  • If the error persists across a linked Availability Group, consider rebuilding the Service Broker GUID using ALTER DATABASE [YourDB] SET NEW_BROKER (note: this is a destructive operation that resets all conversation state and should only be used in non-production or after confirming no in-flight transactions are needed).

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

Troubleshooting Guide: SQL Server Error 11208 — Service Contract Name Exceeds Maximum Size

Why This Error Happens

This error occurs when a Service Broker message attempts to reference a service contract name that exceeds the maximum allowed length of 256 bytes, causing SQL Server to drop the message before delivery. This typically happens due to manual construction of Service Broker messages with malformed or overly verbose contract names, often from third-party applications, custom scripts, or corrupted metadata in the sys.service_contracts system catalog. It can also surface after a botched upgrade or migration where contract definitions were altered or truncated incorrectly, leading to a mismatch between the expected schema and the actual contract name being transmitted.

Step-by-Step Resolution Guide

Step 1: Identify the Offending Contract and Message Origin

  • Open SQL Server Management Studio (SSMS) and check the SQL Server Error Log for the full text of Error 11208, noting the exact contract name and message origin listed in the error.
  • Run the following query to inspect contract definitions: SELECT name, LEN(name) AS NameLength FROM sys.service_contracts;
  • Confirm whether any contract name length exceeds 256 bytes using DATALENGTH(name) instead of LEN(name) to account for Unicode storage.

Step 2: Correct or Recreate the Service Contract

  • Drop the malformed contract using DROP SERVICE CONTRACT [ContractName]; if it is not actively bound to a service.
  • Recreate the contract with a compliant name under 256 bytes: CREATE CONTRACT [ShortValidContractName] ([MessageType] SENT BY INITIATOR);
  • Update any dependent Services and Queues to reference the newly created contract using ALTER SERVICE or by dropping and recreating the service bindings.

Step 3: Audit and Repair Service Broker Configuration Files

  • Navigate to C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\DATA\ on Windows Server 2025 and verify the integrity of the database files hosting Service Broker objects.
  • Run DBCC CHECKDB ('YourDatabaseName') WITH NO_INFOMSGS, ALL_ERRORMSGS; to rule out underlying catalog corruption.
  • If corruption is found in system tables related to Service Broker, restore from the last known good backup rather than attempting an in-place repair.

Step 4: Restart the Service Broker and Validate Message Flow

  • Disable and re-enable Service Broker on the affected database using ALTER DATABASE [YourDatabaseName] SET DISABLE_BROKER; followed by ALTER DATABASE [YourDatabaseName] SET ENABLE_BROKER;
  • Restart the SQL Server service via services.msc or PowerShell: Restart-Service -Name 'MSSQLSERVER'
  • Monitor the error log in real time using xp_readerrorlog to confirm Error 11208 no longer appears during message transmission.

Alternative or Verification Steps

  • Send a test message through the corrected service contract using SEND ON CONVERSATION @ConversationHandle MESSAGE TYPE [YourMessageType] ('Test Payload'); and confirm it is received without triggering Error 11208.
  • If the issue persists, enable Service Broker diagnostic trace flags (such as 9951) temporarily to capture deeper protocol-level details, then review the generated trace output for truncation patterns in contract metadata.

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

Troubleshooting Guide: SQL Server Error 11207

Why This Error Happens

Error 11207 occurs when Service Broker attempts to route a message, but the incoming message envelope does not contain a valid service contract name. This is typically caused by a mismatch between the sending and receiving service definitions, a corrupted message during transit, or a Service Broker endpoint that is misconfigured after a migration or upgrade to SQL Server 2025. In some cases, this is also triggered by third-party applications or custom code sending malformed messages directly to the Service Broker endpoint, bypassing standard contract validation.

Step-by-Step Resolution Guide

Step 1: Verify Service Broker Configuration

  • Open SQL Server Management Studio (SSMS) and connect to the affected instance.
  • Run the following query to confirm Service Broker is enabled on the database: SELECT name, is_broker_enabled FROM sys.databases WHERE name = 'YourDatabaseName';
  • If is_broker_enabled returns 0, enable it using: ALTER DATABASE YourDatabaseName SET ENABLE_BROKER;

Step 2: Inspect the Service and Contract Definitions

  • Query sys.service_contracts and sys.services to ensure the contract referenced by the sending service actually exists and is correctly bound.
  • Check for orphaned services using: SELECT * FROM sys.services WHERE service_id NOT IN (SELECT service_id FROM sys.service_contract_usages);
  • Re-create the contract binding if it is missing: ALTER SERVICE [YourServiceName] ON QUEUE [YourQueue] ([YourContractName]);

Step 3: Examine the Transmission Queue and Routes

  • Check the sys.transmission_queue system view for stuck or malformed messages causing the drop: SELECT * FROM sys.transmission_queue;
  • Validate that routes are pointing to the correct broker instance using SELECT * FROM sys.routes;
  • If a route is outdated (common after a server migration to Windows Server 2025), drop and recreate it with the correct ADDRESS and SERVICE_NAME parameters.

Step 4: Review Firewall and Endpoint Settings

  • Since Windows Server 2025 enforces stricter default firewall policies, ensure the Service Broker endpoint port (typically TCP 4022) is open.
  • Verify the endpoint state is STARTED by running: SELECT name, state_desc FROM sys.tcp_endpoints;
  • If malformed packets are arriving from an external application, restrict access using endpoint-specific authentication (Windows Authentication or Certificates).

Step 5: Enable Extended Events for Deeper Tracing

  • Create an Extended Events session specifically targeting broker_message_classify to capture the exact moment the contract name is dropped.
  • Use the Event Viewer (Windows Logs > Application) to cross-reference the exact timestamp of Event ID 11207 with the SQL trace data.

Alternative or Verification Steps

  • Verification: After applying the fixes, send a test message via SEND ON CONVERSATION and monitor the sys.transmission_queue to ensure it clears immediately without generating a new 11207 error in the Windows Event Viewer.
  • Alternative: If the error persists only for specific external messages, consider implementing a message validation trigger on the queue to reject malformed envelopes before they reach the internal routing logic, preventing the error from flooding the Application log.

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

Troubleshooting Guide: SQL Server Error 11206 – Service Broker Message Dropped (TO Service Name Exceeds Maximum Size)

Why This Error Happens

This error occurs when the Service Broker attempts to route a message to a destination (“TO”) service whose name exceeds the maximum allowed byte length defined by the SQL Server messaging protocol. This is typically caused by a misconfigured CREATE SERVICE or CREATE QUEUE statement where an overly long or dynamically generated service name was used, or by a third-party/custom application passing an invalid service name string into a BEGIN DIALOG CONVERSATION call. In rare cases, this can also stem from corrupted or malformed message headers during transmission between Service Broker endpoints.

Step-by-Step Resolution Guide

Step 1: Identify the Offending Service Name

  • Review the full error text captured in the SQL Server error log or Windows Event Viewer (Event ID 11206) to extract the exact service name and “Message origin” listed in the error.
  • Run the following query to locate services with excessively long names in your databases:
SELECT name, LEN(name) AS NameLength 
FROM sys.services 
WHERE LEN(name) > 256;
  • Cross-reference this with the application or stored procedure that initiated the dialog conversation.

Step 2: Correct the Service Name Definition

  • Modify the application code or T-SQL script responsible for creating the service to ensure the name does not exceed 256 Unicode characters (512 bytes).
  • Update the CREATE SERVICE statement, for example:
CREATE SERVICE [ShortServiceName] 
ON QUEUE [dbo].[TargetQueue] 
([//Contract/MyContract]);
  • If the name is dynamically generated (e.g., via GUIDs or concatenated strings), add validation logic in the application layer to truncate or hash the name before service creation.

Step 3: Clear Orphaned or Poisoned Messages

  • Check the transmission_queue system view for stuck messages referencing the invalid service name:
SELECT * FROM sys.transmission_queue 
WHERE to_service_name LIKE '%<partial_name>%';
  • If poisoned messages are found, end the problematic conversation to clear the queue:
END CONVERSATION 'conversation_handle' WITH CLEANUP;

Step 4: Restart the Service Broker (If Required)

  • If the queue remains stuck after cleanup, disable and re-enable Service Broker on the affected database:
ALTER DATABASE [YourDB] SET DISABLE_BROKER;
ALTER DATABASE [YourDB] SET ENABLE_BROKER;
  • Ensure no active transactions are holding locks on the Service Broker objects before running this step.

Alternative or Verification Steps

  • Verify the fix by monitoring the SQL Server Error Log and Event Viewer for 10–15 minutes to confirm Error 11206 no longer appears.
  • As an alternative, enable Service Broker diagnostic tracing via Extended Events (sqlserver.broker_message_classify and sqlserver.broker_conversation) to catch any remaining oversized service names before they trigger a drop.

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

Why This Error Happens

This error occurs within SQL Server Service Broker when a message is transmitted without a valid destination service name embedded in the message header, causing the Broker transport layer to immediately discard it. It typically stems from a malformed SEND statement, a corrupted or incomplete conversation handle, or a third-party/custom application constructing Service Broker messages manually without properly populating the routing metadata. In rarer cases, network packet corruption between mirrored or Always On replica endpoints can strip the service name field during transit.

Step-by-Step Resolution Guide

Step 1: Audit the Application Code Sending the Message

  • Review the SEND ON CONVERSATION statements in the stored procedures or application layer generating the message.
  • Confirm the conversation was initiated correctly using BEGIN DIALOG CONVERSATION FROM SERVICE [InitiatorService] TO SERVICE 'TargetServiceName'.
  • Check for typos, NULL values, or missing quotes around the TO SERVICE name in dialog initiation scripts.

Step 2: Validate Service Broker Configuration

  • Open SQL Server Management Studio (SSMS) and run the following against the affected database:
  SELECT name, service_id, service_queue_id FROM sys.services;
  • Ensure the target service name referenced in the application matches an entry exactly (case-sensitive) in sys.services.
  • If the service was dropped or renamed, recreate it using:
  CREATE SERVICE [TargetServiceName] ON QUEUE [dbo].[TargetQueue] ([ContractName]);

Step 3: Inspect Routing and Broker Configuration

  • Navigate to SQL Server Configuration Manager on Windows Server 2025 and confirm the Service Broker endpoint is enabled under the instance’s TCP/IP protocol settings.
  • Query routing tables to ensure no broken routes exist:
  SELECT * FROM sys.routes;
  • If using cross-instance messaging, verify the ROUTE object includes a valid SERVICE_NAME and ADDRESS clause pointing to the correct remote instance.

Step 4: Clear Corrupted Conversation Handles

  • Identify stuck or malformed conversations using:
  SELECT * FROM sys.conversation_endpoints WHERE far_service IS NULL;
  • End any conversations missing a valid far_service value:
  END CONVERSATION 'conversation_handle_guid' WITH CLEANUP;

Step 5: Restart the SQL Server Service Broker Task

  • In an elevated PowerShell session on Windows Server 2025, restart the SQL Server service to reinitialize the Broker task:
  Restart-Service -Name 'MSSQLSERVER' -Force
  • Confirm Service Broker is active post-restart:
  SELECT is_broker_enabled FROM sys.databases WHERE name = 'YourDatabaseName';

Alternative or Verification Steps

  • Enable a Service Broker trace using Extended Events (broker_message_classify and broker_conversation events) to capture the exact message origin referenced in the error (%ls) and confirm the service name populates correctly on retry.
  • If the issue persists after code and configuration fixes, drop and recreate the affected queue and service objects entirely, then re-run the dialog initiation to rule out metadata corruption at the object level.

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

Troubleshooting Guide: SQL Server Error 11204 — Broker Instance Exceeds Maximum Size

Why This Error Happens

This error occurs when a Service Broker message contains a “FROM” broker instance identifier (a GUID-based conversation handle string) that exceeds the internal size limit enforced by SQL Server, typically due to message corruption in transit or a malformed dialog initiated by a non-standard or third-party client. It can also result from network-layer packet corruption, mismatched Service Broker endpoint certificates causing garbled decryption, or a bug in custom application code that manually constructs Service Broker message headers. In rare cases, outdated SQL Server 2025 cumulative updates with known Service Broker parsing defects can trigger this behavior even with valid messages.

Step-by-Step Resolution Guide

Step 1: Verify Service Broker Configuration and Certificates

  • Run SELECT name, is_broker_enabled FROM sys.databases WHERE name = 'YourDatabaseName'; to confirm Service Broker is properly enabled.
  • Check certificate validity using SELECT * FROM sys.certificates; on both the initiator and target databases to rule out encryption/decryption mismatches corrupting message headers.
  • Ensure certificate expiration dates and subject names match expected configurations on both ends of the conversation.

Step 2: Inspect and Clean Up Broken Conversations

  • Query SELECT * FROM sys.conversation_endpoints WHERE state_desc <> 'CONVERSING'; to identify stuck or malformed dialogs.
  • End problematic conversations manually using END CONVERSATION 'conversation_handle' WITH CLEANUP; to purge corrupted message chains from the queue.
  • Check sys.transmission_queue for messages with transmission_status showing repeated Error 11204 entries and remove them if they are stale.

Step 3: Apply Latest SQL Server 2025 Cumulative Update

  • Navigate to the Microsoft Update Catalog and download the latest Cumulative Update (CU) for SQL Server 2025, as several Service Broker parsing fixes are frequently rolled into CUs.
  • Install using the setup executable with /ACTION=Patch /IACCEPTSQLSERVERLICENSETERMS flags from an elevated PowerShell session on Windows Server 2025.
  • Restart the SQL Server service via services.msc or Restart-Service -Name 'MSSQLSERVER' after patching completes.

Step 4: Rebuild the Affected Queue and Service

  • Drop and recreate the affected Service Broker QUEUE and SERVICE objects using DROP SERVICE [YourServiceName]; followed by CREATE SERVICE with the original contract definitions.
  • Re-link the SERVICE to its QUEUE and verify the ROUTE and remote service binding definitions are intact using SELECT * FROM sys.routes; and SELECT * FROM sys.remote_service_bindings;.
  • Restart any application components that initiate dialogs to ensure they reconnect to the rebuilt service cleanly.

Alternative or Verification Steps

  • To verify the fix, send a test message through the Service Broker dialog and monitor sys.transmission_queue to confirm it clears without generating new 11204 errors in the SQL Server Error Log (EXEC xp_readerrorlog 0, 1, N'11204';).
  • If the error persists, consider enabling Service Broker trace flags (such as 1222 combined with Extended Events for broker_message_classify) to capture the raw malformed message for deeper packet-level analysis.

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

Troubleshooting Guide: SQL Server Error 11203 — Missing FROM Broker Instance

Why This Error Happens

This error occurs when a Service Broker message arrives at an endpoint, but the broker instance referenced in the message’s FROM field does not exist in the local sys.conversation_endpoints or sys.services metadata. This typically happens after a database restore, mirroring failover, or Availability Group failover where the broker GUID changes or becomes out of sync with the sending endpoint. It can also occur due to corrupted or stale routing information, orphaned conversations, or a dropped/recreated service that retained old queued messages referencing the previous broker instance ID.

Step-by-Step Resolution Guide

Step 1: Verify the Broker GUID Consistency

  • Run SELECT service_broker_guid, name FROM sys.databases WHERE name = 'YourDatabaseName'; on both the sending and receiving instances.
  • Compare the GUID against what is stored in sys.conversation_endpoints to confirm a mismatch.
  • If the database was restored or failed over recently, this mismatch is the most likely root cause.

Step 2: Clean Up Orphaned Conversations and Routes

  • Query SELECT * FROM sys.conversation_endpoints WHERE is_initiator = 0; to identify stale endpoints.
  • End broken conversations manually using END CONVERSATION 'conversation_handle' WITH CLEANUP;
  • Drop and recreate any stale routes with DROP ROUTE and CREATE ROUTE pointing to the correct BROKER_INSTANCE GUID.

Step 3: Re-Enable and Reset the Service Broker

  • Disable Service Broker temporarily: ALTER DATABASE YourDatabaseName SET DISABLE_BROKER;
  • Re-enable it to regenerate internal broker state: ALTER DATABASE YourDatabaseName SET ENABLE_BROKER;
  • If running in an Availability Group on Windows Server 2025, confirm the listener and broker endpoint (default TCP port 4022) are reachable via Test-NetConnection -ComputerName <ListenerName> -Port 4022 in PowerShell.

Step 4: Check Endpoint Permissions and Certificates

  • Verify the Service Broker endpoint has CONNECT permission granted to the correct login: GRANT CONNECT ON ENDPOINT::[Broker_Endpoint] TO [DOMAIN\ServiceAccount];
  • If using certificate-based authentication, confirm certificates haven’t expired using SELECT * FROM sys.certificates;
  • Re-import or renew certificates on both instances if validation fails.

Step 5: Purge Poison Messages (If Applicable)

  • Check the target queue for poisoned or malformed messages: SELECT * FROM YourQueueName;
  • If a corrupted message triggered the error repeatedly (causing the queue to disable), re-enable it: ALTER QUEUE YourQueueName WITH STATUS = ON;
  • Remove the offending message using RECEIVE with explicit conversation_handle filtering, then log it externally before discarding.

Alternative or Verification Steps

  • To verify the fix, generate a test message through the application or SEND ON CONVERSATION manually, then confirm it arrives in the target queue without a corresponding entry in the SQL Server error log for Event ID 11203.
  • If the issue persists after these steps, consider fully dropping and recreating the Service Broker service and queue objects (DROP SERVICE, DROP QUEUE, then recreate), as this forces SQL Server to regenerate a fresh, consistent broker instance GUID across your topology.

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

Troubleshooting Guide: SQL Server Error 11202 — “FROM Service Name Exceeds Maximum Size”

Why This Error Happens

This error occurs within SQL Server Service Broker when a message is sent using a FROM service name that exceeds the maximum allowable length of 256 bytes. This typically happens due to misconfigured Service Broker routing, a dynamically generated or concatenated service name in application code, or corrupted/malformed routing data in the sys.routes or sys.services catalog views. Since Service Broker enforces strict size limits for service names to maintain message integrity across dialogs, any violation causes the message to be silently dropped and logged as Error 11202.

Step-by-Step Resolution Guide

Step 1: Identify the Offending Service Name

  • Open the SQL Server Error Log or Windows Event Viewer (under Applications and Services Logs > MSSQLSERVER) and locate the full Error 11202 message.
  • Note the exact service name string and the “Message origin” value provided in the error text.
  • Run the following query to cross-reference the service name against existing definitions: SELECT name, service_id FROM sys.services WHERE name LIKE '%<partial_name>%';

Step 2: Inspect and Correct Service Broker Configuration

  • Navigate to SQL Server Management Studio (SSMS) > Object Explorer > Databases > [Your Database] > Service Broker > Services.
  • Check for any service names generated dynamically in application code (common in multi-tenant or queue-based systems) that may be improperly concatenating GUIDs, URLs, or tenant identifiers.
  • Shorten the service name definition in your T-SQL creation script, ensuring it does not exceed 256 bytes: CREATE SERVICE [ShortServiceName] ON QUEUE [YourQueue] ([YourContract]);
  • If the name is generated by middleware (e.g., a .NET or Java application), update the connection string or configuration file (typically located at C:\Program Files\YourApp\config\app.config on Windows Server 2025) to enforce a character limit on the service name variable.

Step 3: Clear Corrupted Routing Entries

  • Query the routing table to check for malformed or duplicate entries: SELECT * FROM sys.routes;
  • Drop and recreate any routes pointing to the invalid service name: DROP ROUTE [InvalidRouteName]; CREATE ROUTE [NewRouteName] WITH SERVICE_NAME = 'ShortServiceName', ADDRESS = 'LOCAL';
  • Restart the SQL Server (MSSQLSERVER) service via services.msc or by running net stop MSSQLSERVER && net start MSSQLSERVER in an elevated Command Prompt.

Step 4: Validate Application-Level Naming Conventions

  • Review the application source code or ORM configuration (e.g., Entity Framework, Hibernate) responsible for generating the service name strings.
  • Implement a hard-coded truncation or validation function to ensure no service name string exceeds 256 bytes before it is passed to the BEGIN DIALOG command.

Alternative or Verification Steps

  • Verify the fix: Re-run the process that triggered the original message and monitor the SQL Server Error Log for 10–15 minutes to confirm Error 11202 no longer appears.
  • Alternative solution: If the issue persists due to a third-party application generating the oversized name, implement a Service Broker Routing Table override using a fixed alias to intercept and rename the service before the message reaches the Broker endpoint.

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

Troubleshooting Guide: SQL Server Error 11201 — Missing FROM Service Name

Why This Error Happens

Error 11201 occurs when the Service Broker message header is malformed or incomplete, specifically missing the originating service name required for routing. This typically results from a corrupted Service Broker conversation, improper message construction via BEGIN DIALOG or SEND commands, or network transmission issues (such as truncated packets) between SQL Server instances. It can also surface after a failed database restore or mirroring failover where Service Broker metadata becomes desynchronized.

Step-by-Step Resolution Guide

Step 1: Verify Service Broker Configuration

  • Run the following query to confirm Service Broker is enabled on the database:
  SELECT name, is_broker_enabled FROM sys.databases WHERE name = 'YourDatabaseName';
  • If is_broker_enabled returns 0, enable it:
  ALTER DATABASE YourDatabaseName SET ENABLE_BROKER;
  • Check that the GUID for the database hasn’t changed unexpectedly due to a restore or copy operation, as this can orphan existing conversations.

Step 2: Inspect and Clean Up Broken Conversations

  • Query the transmission queue to identify malformed messages:
  SELECT * FROM sys.transmission_queue WHERE transmission_status LIKE '%FROM service name%';
  • End any corrupted conversations manually:
  END CONVERSATION 'conversation_handle' WITH CLEANUP;
  • Clear the Service Broker queue if backlog is causing repeated errors:
  ALTER QUEUE YourQueueName WITH STATUS = OFF;
  ALTER QUEUE YourQueueName WITH STATUS = ON;

Step 3: Validate Network and Routing Configuration

  • On Windows Server 2025 / Windows 11, confirm firewall rules allow Service Broker traffic (default port 4022) in Windows Defender Firewall with Advanced Security.
  • Check ROUTE objects in SQL Server to ensure the FROM and TO service names are correctly mapped:
  SELECT * FROM sys.routes;
  • If using certificates for dialog security, verify they haven’t expired via sys.certificates.

Step 4: Rebuild Service Broker Objects if Corruption Persists

  • Drop and recreate the affected Service Broker service and queue:
  DROP SERVICE YourServiceName;
  DROP QUEUE YourQueueName;
  CREATE QUEUE YourQueueName;
  CREATE SERVICE YourServiceName ON QUEUE YourQueueName ([YourContract]);
  • Restart the SQL Server service via SQL Server Configuration Manager to clear any cached broker state.

Alternative or Verification Steps

  • After applying fixes, re-run the application workflow that triggers the message send and monitor sys.transmission_queue to confirm it remains empty (no stuck messages).
  • If the error persists across restarts, run DBCC CHECKDB on the affected database to rule out underlying corruption, and consider restoring from a known-good backup with intact Service Broker metadata.

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

Troubleshooting Guide: SQL Server Error 11109 – “The Provider Does Not Support an Index Scan on This Data Source”

Why This Error Happens

This error occurs when SQL Server’s query optimizer attempts to perform an index scan against a linked server data source, but the underlying OLE DB provider only supports table scans or lacks the necessary indexing capabilities. It is commonly triggered by outdated or incompatible OLE DB/ODBC providers (such as older drivers for Excel, Access, or third-party databases) that do not expose index metadata correctly to SQL Server 2025. Corrupted provider registrations or misconfigured linked server settings in Windows Server 2025 can also prevent the provider from communicating index support properly.

Step-by-Step Resolution Guide

Step 1: Identify the Problematic Linked Server Provider

  • Open SQL Server Management Studio (SSMS) and navigate to Server Objects > Linked Servers.
  • Right-click the linked server in question and select Properties to view the provider name (e.g., Microsoft.ACE.OLEDB.16.0, MSDASQL).
  • Run EXEC sp_linkedservers; in a new query window to confirm the provider and data source path.

Step 2: Update or Replace the OLE DB/ODBC Provider

  • Download and install the latest 64-bit version of the provider from the official vendor (e.g., Microsoft Access Database Engine 2016 Redistributable for ACE.OLEDB).
  • Ensure the provider matches the SQL Server 2025 architecture (64-bit only; 32-bit providers are not supported).
  • Restart the SQL Server service after installation via services.msc or net stop MSSQLSERVER && net start MSSQLSERVER.

Step 3: Adjust Linked Server Provider Options

  • In SSMS, go to Linked Servers > Providers, right-click the provider (e.g., MSDASQL), and select Properties.
  • Disable the “Index as Access Path” checkbox if it is enabled, as this forces SQL Server to request index scans unsupported by some providers.
  • Click OK and restart the SQL Server instance to apply the change.

Step 4: Modify the Query to Avoid Index Scan Requests

  • Rewrite the query using OPENQUERY() instead of four-part linked server naming, which forces the remote provider to handle execution natively.
  • Example: SELECT * FROM OPENQUERY(LinkedServerName, 'SELECT * FROM TableName');
  • This bypasses SQL Server’s optimizer attempting to push index scan operations to an incompatible provider.

Step 5: Verify Windows Server 2025 Driver Compatibility

  • Open Control Panel > ODBC Data Sources (64-bit) and confirm the data source driver matches the installed provider version.
  • Check Event Viewer > Windows Logs > Application for related provider errors (Event ID 7302 or 7303) that may indicate registration failures.
  • Re-register the provider DLL if necessary using regsvr32 "C:\Program Files\Common Files\System\Ole DB\msdasql.dll".

Alternative or Verification Steps

  • Test the fix by re-running the original query or stored procedure that triggered Error 11109; it should now execute without the index scan exception.
  • If the issue persists, switch the linked server connection to use OPENROWSET with explicit provider strings, which often resolves compatibility issues without requiring provider-level configuration changes.

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

Troubleshooting Guide: SQL Server Error 11108 — “The Provider Could Not Support a Required Property”

Why This Error Happens

This error typically occurs when SQL Server 2025’s OLE DB provider (often linked to linked server configurations or distributed queries) cannot negotiate a required property with the underlying data provider, usually due to a mismatched or outdated provider version. It can also stem from incorrect provider options set on a linked server, insufficient permissions on the provider DLL, or corruption in the MSDAINITIALIZE/OLE DB provider registration within Windows Server 2025. In some cases, this is triggered when the provider is configured to run outside its supported threading model or security context.

Step-by-Step Resolution Guide

Step 1: Verify and Update the OLE DB Provider

  • Confirm which provider is throwing the error (e.g., MSOLEDBSQL, Oracle OLE DB, or a third-party provider) by checking the linked server properties in SQL Server Management Studio (SSMS).
  • Navigate to Server Objects > Linked Servers > [Your Linked Server] > Properties and note the provider name.
  • Download and install the latest version of the provider from the vendor (for Microsoft OLE DB Driver, check for MSOLEDBSQL 19.x or later compatible with SQL Server 2025).
  • Restart the SQL Server service after installation: net stop MSSQLSERVER && net start MSSQLSERVER

Step 2: Correct the Linked Server Provider Options

  • Open SSMS and run the following query to inspect current provider options:
  EXEC sp_linkedservers;
  • Reset problematic provider options (like “Nested Queries,” “Level Zero Only,” or “Data Access”) using:
  EXEC sp_serveroption 'YourLinkedServerName', 'data access', true;
  EXEC sp_serveroption 'YourLinkedServerName', 'rpc out', true;
  • Disable unsupported or conflicting flags causing the property mismatch, particularly “collation compatible” if cross-platform providers are involved.

Step 3: Check Provider Registration in Windows Server 2025

  • Open Component Services (dcomcnfg.exe) and navigate to Component Services > Computers > My Computer > DCOM Config.
  • Locate the provider (e.g., “Microsoft OLE DB Provider for SQL Server”) and verify permissions under the Security tab allow the SQL Server service account full access.
  • Ensure the provider DLL is correctly registered by re-registering it via an elevated Command Prompt:
  regsvr32 "C:\Program Files\Microsoft SQL Server\160\Shared\msoledbsql.dll"

Step 4: Validate Distributed Query Configuration

  • Check if “Allow InProcess” is enabled for the provider in SSMS under Linked Servers > Providers > [Provider Name] > Properties.
  • Toggle “Allow InProcess” if disabled, as out-of-process providers sometimes fail to support certain dynamic properties required for distributed transactions.
  • Restart the SQL Server Agent and SQL Server services to apply the change.

Alternative or Verification Steps

  • Run a test query against the linked server (e.g., SELECT * FROM OPENQUERY(YourLinkedServer, 'SELECT 1')) to confirm the error no longer appears.
  • If the issue persists, consider switching to a newer, fully supported provider (such as migrating from SQLNCLI to MSOLEDBSQL) since deprecated providers often lack full property support in SQL Server 2025.

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

Troubleshooting Guide: Error 11107 – “The Provider Could Not Support a Row Lookup Position”

Why This Error Happens

This error typically occurs when a distributed query or linked server operation uses a cursor-based row lookup (such as IRowsetLocate or bookmark-based positioning) that the underlying OLE DB provider does not support. It is commonly triggered by outdated or mismatched OLE DB drivers (e.g., legacy providers like SQLNCLI or third-party ODBC-to-OLE DB bridges) that lack full support for server-side cursors required by SQL Server 2025’s query engine. Corrupted provider registration in the Windows Registry or an incompatible driver version installed on Windows Server 2025 can also prevent the provider from fulfilling the lookup request.

Step-by-Step Resolution Guide

Step 1: Identify and Update the OLE DB Provider

  • Open SQL Server Management Studio (SSMS) and navigate to Server Objects > Linked Servers > Providers.
  • Check which provider is flagged (common culprits: MSDASQL, SQLNCLI11, or third-party providers like Oracle’s OraOLEDB).
  • Download and install the latest provider version compatible with SQL Server 2025 and Windows Server 2025/Windows 11 from the vendor’s official site.
  • Restart the SQL Server service after installation: net stop MSSQLSERVER && net start MSSQLSERVER.

Step 2: Adjust Provider Options to Disable Unsupported Features

  • In SSMS, right-click the provider under Linked Servers > Providers, select Properties.
  • Uncheck “Nested Queries” and “Supports Like” if the provider does not fully support cursor positioning.
  • Enable “Allow InProcess” only if the provider is known to be thread-safe and stable in-process.
  • Apply changes and restart the SQL Server service to reload provider settings.

Step 3: Rewrite the Query to Avoid Server-Side Cursors

  • Replace FOR UPDATE or scrollable cursor logic in your distributed query with a SELECT into a temporary table or table variable.
  • Use OPENQUERY() instead of four-part linked server naming (Server.Database.Schema.Table) to force pass-through execution and avoid local cursor emulation.
  • Example: SELECT * INTO #temp FROM OPENQUERY(LinkedServerName, 'SELECT * FROM RemoteTable').

Step 4: Repair or Re-register the Provider DLL

  • Open an elevated Command Prompt on Windows Server 2025.
  • Locate the provider DLL (commonly in C:\Windows\System32\ or C:\Program Files\Common Files\System\Ole DB\).
  • Re-register the DLL using: regsvr32 /u "<path_to_dll>" followed by regsvr32 "<path_to_dll>".
  • Verify registry integrity under HKEY_CLASSES_ROOT\CLSID\{Provider-GUID} to ensure no corrupted entries remain.

Alternative or Verification Steps

  • Run the original distributed query again in SSMS and confirm Error 11107 no longer appears in the Messages tab or Windows Event Viewer (Event ID 11107 under Application Logs).
  • If the error persists, bypass the OLE DB provider entirely by migrating the linked server connection to a native ODBC Driver 18 for SQL Server connection, which has broader compatibility with row lookup operations in SQL Server 2025.

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

Troubleshooting Guide: Error 11106 – “The Provider Could Not Support Deletion on This Table”

Why This Error Happens

This error typically occurs when SQL Server 2025 attempts to perform a DELETE operation against a linked server table through an OLE DB provider that does not support the IRowsetChange interface required for deletion. It commonly surfaces when the underlying provider is read-only, the target table lacks a unique index or primary key that the provider can use to identify rows for deletion, or the linked server configuration has outdated/misconfigured provider options. Additionally, this can happen when querying heterogeneous data sources (like Excel, text files, or certain ODBC-based linked servers) that are inherently limited to read operations.

Step-by-Step Resolution Guide

Step 1: Verify the Linked Server Provider Capabilities

  • Open SSMS and navigate to Server Objects > Linked Servers > Providers.
  • Right-click the specific provider (e.g., MSDASQL, Microsoft.ACE.OLEDB.16.0) and select Properties.
  • Ensure the checkbox for “Allow InProcess” is enabled, and confirm whether the provider natively supports DML operations like DELETE.
  • If the provider is inherently read-only (common for flat files or Excel), deletion is not possible without replacing the data source.

Step 2: Check for Unique Identifiers on the Target Table

  • Run the following query against the target table to confirm a primary key or unique index exists:
  EXEC sp_helpindex 'YourTableName';
  • If no unique index is found, the provider cannot generate a reliable WHERE clause for the delete operation.
  • Add a primary key or unique constraint if missing:
  ALTER TABLE YourTableName ADD CONSTRAINT PK_YourTable PRIMARY KEY (ColumnName);

Step 3: Update Linked Server Configuration and Drivers

  • Navigate to C:\Program Files\Microsoft SQL Server\160\DTS\Binn\ (or the relevant version path for SQL Server 2025) and confirm the correct OLE DB driver version is installed.
  • Reconfigure the linked server using sp_addlinkedserver with updated provider strings.
  • On Windows Server 2025, open ODBC Data Source Administrator (64-bit) via odbcad32.exe and verify the DSN settings match the required authentication and permission levels.

Step 4: Adjust Server-Level Provider Options

  • Run the following T-SQL command to enable necessary DML support flags on the provider:
  EXEC sp_serveroption 'LinkedServerName', 'rpc out', true;
  • Restart the SQL Server service via services.msc or run:
  Restart-Service -Name 'MSSQLSERVER'

Alternative or Verification Steps

  • To verify the fix, attempt a test DELETE statement on a single row using a fully qualified four-part name (LinkedServer.Database.Schema.Table) and confirm no Error 11106 is returned.
  • As an alternative, if the provider remains unsupported for direct deletion, use an OPENQUERY pass-through command instead, which routes the DELETE directly to the native provider:
  DELETE FROM OPENQUERY(LinkedServerName, 'SELECT * FROM TargetTable WHERE ID = 1');

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

Troubleshooting Guide: Error 11105 – “The Provider Could Not Support Updates on This Table”

Why This Error Happens

This error typically occurs when SQL Server 2025 attempts to perform an UPDATE, INSERT, or DELETE operation through a linked server using an OLE DB provider that only supports read-only (SELECT) operations against the target table. It can also happen when the table lacks a unique index or primary key, preventing the provider from identifying individual rows for modification. Additionally, outdated or misconfigured OLE DB provider settings on Windows Server 2025 / Windows 11 can restrict the provider’s ability to negotiate update capabilities with the remote data source.

Step-by-Step Resolution Guide

Step 1: Verify the OLE DB Provider’s Update Capabilities

  • Open SQL Server Management Studio (SSMS) and navigate to Server Objects > Linked Servers > Providers.
  • Right-click the provider in use (e.g., MSDASQL, Microsoft.ACE.OLEDB.16.0) and select Properties.
  • Ensure the checkboxes “Allow InProcess” and “Nested Queries” are enabled.
  • Confirm the provider itself supports write operations; some providers (like certain ODBC-to-OLEDB bridges) are strictly read-only by design.

Step 2: Check for a Unique Key or Primary Key on the Target Table

  • Connect to the remote data source and inspect the table schema.
  • Run the following T-SQL to confirm key presence:
EXEC sp_help 'RemoteTableName';
  • If no primary key or unique index exists, create one:
ALTER TABLE RemoteTableName ADD CONSTRAINT PK_RemoteTable PRIMARY KEY (ColumnName);
  • Without a unique identifier, the provider cannot map changes back to specific rows.

Step 3: Reconfigure the Linked Server Options

  • Run the following script to adjust linked server settings for update support:
EXEC sp_serveroption 'LinkedServerName', 'rpc', 'true';
EXEC sp_serveroption 'LinkedServerName', 'rpc out', 'true';
  • Restart the SQL Server (MSSQLSERVER) service via Services.msc on Windows Server 2025 after applying changes.

Step 4: Update or Reinstall the OLE DB Driver

  • Navigate to Control Panel > Programs > Programs and Features on Windows 11/Windows Server 2025.
  • Locate the OLE DB provider (e.g., Microsoft OLE DB Driver for SQL Server) and check the installed version.
  • Download and install the latest driver from the official Microsoft Download Center, then reboot the server to ensure proper registry binding.

Alternative or Verification Steps

  • To verify the fix, re-run the original UPDATE/INSERT/DELETE query against the linked server table — it should complete without Error 11105.
  • As an alternative, bypass the direct linked server update by using OPENQUERY() instead, which routes the command differently:
UPDATE OPENQUERY(LinkedServerName, 'SELECT Column1 FROM RemoteTableName WHERE ID = 1') SET Column1 = 'NewValue';

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

Why This Error Happens

This error occurs when SQL Server attempts to perform a data modification (INSERT, UPDATE, or DELETE) against a linked server, but the OLE DB provider being used does not implement the IRowsetChange interface required for these operations. Many lightweight or read-oriented OLE DB providers (such as older Jet, ODBC-to-OLEDB bridges, or certain Oracle/Excel drivers) only support SELECT queries and were never designed to support direct row-level modification commands. This is typically a provider limitation rather than a SQL Server configuration bug, though incorrect linked server settings can trigger it unnecessarily.

Step-by-Step Resolution Guide

Step 1: Identify the Linked Server Provider

  • Open SQL Server Management Studio (SSMS) and expand Server Objects > Linked Servers.
  • Right-click the linked server throwing the error and select Properties to view the Provider field (e.g., MSDASQL, Microsoft.ACE.OLEDB.12.0, OraOLEDB.Oracle).
  • Cross-reference the provider name with Microsoft’s documentation to confirm whether it supports IRowsetChange.

Step 2: Switch to a Fully-Compliant OLE DB Provider

  • If the current provider is outdated (e.g., Microsoft.Jet.OLEDB.4.0), replace it with a modern, fully compliant equivalent such as MSOLEDBSQL (Microsoft OLE DB Driver for SQL Server) for SQL-to-SQL links.
  • For ODBC-based connections, migrate to a native OLE DB driver instead of the generic MSDASQL provider, as MSDASQL frequently lacks full DML support.
  • Download and install the required provider from the official Microsoft or vendor site, then restart the SQL Server (MSSQLSERVER) service.

Step 3: Adjust Linked Server Options Instead of Direct DML

  • Open Linked Server Properties > Server Options in SSMS.
  • Enable RPC and RPC Out to allow remote procedure calls instead of direct distributed queries.
  • Where provider limitations persist, replace direct UPDATE/INSERT/DELETE statements against the linked server with calls to a stored procedure on the remote server via EXEC (...) AT [LinkedServerName] or sp_addlinkedserver configured with rpc out enabled.

Step 4: Rebuild the Linked Server Definition

  • Drop the existing linked server configuration:
  EXEC sp_dropserver 'LinkedServerName', 'droplogins';
  • Recreate it with the updated provider and explicit security context:
  EXEC sp_addlinkedserver 
      @server = 'LinkedServerName', 
      @provider = 'MSOLEDBSQL', 
      @datasrc = 'RemoteServerName';
  • Reconfigure linked login mappings using sp_addlinkedsrvlogin.

Alternative or Verification Steps

  • After reconfiguring, test with a simple UPDATE statement against the linked server table to confirm Error 11103 no longer appears.
  • If the provider genuinely cannot support DML (common with legacy or read-only data sources), use OPENQUERY with a pass-through SQL statement instead of direct four-part naming, as OPENQUERY routes the command directly to the provider and often bypasses this interface limitation.

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

Troubleshooting Guide: SQL Server Error 11104

Why This Error Happens

Error 11104 (“The provider could not support insertion on this table”) occurs when SQL Server attempts to perform a distributed query or linked server operation (via INSERT, OPENQUERY, or OPENROWSET) against a target table that the OLE DB provider cannot handle for write operations. This typically happens because the linked server’s OLE DB provider does not support the IRowsetChange interface required for row insertion, or because the target table contains unsupported data types, missing primary keys, or read-only constraints. It can also surface when provider-specific settings like AllowInProcess or DynamicParameters are misconfigured on Windows Server 2025 / Windows 11 hosts.

Step-by-Step Resolution Guide

Step 1: Verify Linked Server Provider Capabilities

  • Open SQL Server Management Studio (SSMS) and navigate to Server Objects > Linked Servers > Providers.
  • Right-click the relevant OLE DB provider (e.g., MSOLEDBSQL, Microsoft.ACE.OLEDB.16.0) and select Properties.
  • Ensure “Allow InProcess” is checked, as out-of-process providers frequently fail on insert operations.
  • Confirm the provider version supports IRowsetChange; outdated providers (pre-2019) often lack this support.

Step 2: Check Target Table Structure

  • Confirm the destination table has a defined Primary Key or unique identifier column; providers often reject inserts on heap tables without one.
  • Verify no columns use unsupported data types (e.g., sql_variant, XML, or large deprecated TEXT/NTEXT types) for the linked provider.
  • Run the following to inspect constraints:
EXEC sp_help 'YourTargetTable';
  • Remove or modify any INSTEAD OF triggers that may block the insertion interface.

Step 3: Reconfigure the Linked Server Settings

  • Open a new query window and update the linked server options:
EXEC sp_serveroption 'YourLinkedServer', 'rpc out', 'true';
EXEC sp_serveroption 'YourLinkedServer', 'data access', 'true';
  • Restart the SQL Server (MSSQLSERVER) service via services.msc on Windows Server 2025 to apply provider-level changes.
  • If using OPENROWSET, ensure Ad Hoc Distributed Queries is enabled:
EXEC sp_configure 'Ad Hoc Distributed Queries', 1;
RECONFIGURE;

Step 4: Switch to a Staging Table Workaround

  • If the provider inherently lacks insert support (common with legacy Jet/ACE or ODBC-based providers), insert into a local staging table first.
  • Use a standard INSERT INTO LocalStagingTable SELECT * FROM OPENQUERY(...) pattern instead of a direct remote insert.
  • Push data to the final destination using a native INSERT statement from the staging table rather than through the OLE DB provider directly.

Alternative or Verification Steps

  • Verify the fix: Re-run the original INSERT/OPENQUERY statement; if successful, check sys.dm_exec_connections to confirm the linked server connection is stable and using the correct provider.
  • Alternative: If the error persists, replace the legacy OLE DB linked server connection with a native ODBC Driver 18 for SQL Server connection, which has broader support for write-back operations on Windows Server 2025.

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

Why This Error Happens

Error 11101 occurs when the SQL Server Full-Text Search (FTS) engine cannot load or communicate with the required text-filtering COM interfaces, typically the msfte.dll or related filter daemon components. This usually happens because the SQL Server Full-Text Filter Daemon Launcher (MSSQLFDLauncher) service is stopped, improperly registered, or running under an account lacking the necessary permissions. It can also stem from corrupted or missing Full-Text Search binaries after an in-place upgrade or a Windows Server 2025 cumulative update that overwrote shared COM registrations.

Step-by-Step Resolution Guide

Step 1: Verify the Full-Text Filter Daemon Launcher Service

  • Open Services.msc on Windows Server 2025 / Windows 11.
  • Locate SQL Server Full-Text Filter Daemon Launcher (MSSQLSERVER) (or the named instance equivalent).
  • Ensure the Startup Type is set to Automatic and the service status is Running.
  • If stopped, right-click and select Start, then monitor the SQL Server error log for recurrence of Error 11101.

Step 2: Check Service Account Permissions

  • Confirm the account running the Filter Daemon Launcher has Log on as a service rights (via secpol.msc → Local Policies → User Rights Assignment).
  • Verify the account has read/execute permissions on:
  • C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Binn\
  • C:\Program Files\Common Files\Microsoft Shared\Full Text\
  • Restart the service after adjusting permissions.

Step 3: Re-register the Full-Text Search COM Components

  • Open an elevated Command Prompt.
  • Navigate to the Binn directory: cd "C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Binn"
  • Re-register the filter daemon host library:
  • regsvr32 msfte.dll
  • regsvr32 msftefd.exe /RegServer
  • Restart the SQL Server and Full-Text services.

Step 4: Repair the SQL Server Full-Text Feature

  • Launch SQL Server Installation Center from the Start menu.
  • Select Maintenance → Repair.
  • Choose the affected instance and allow the installer to repair the Full-Text and Semantic Extractions for Search component.
  • Reboot the server once the repair completes.

Alternative or Verification Steps

  • Run a test query using CONTAINS() or FREETEXT() against a full-text indexed table; if it returns results without error, the fix is confirmed.
  • If the issue persists, drop and rebuild the full-text catalog using DROP FULLTEXT CATALOG followed by CREATE FULLTEXT CATALOG, then repopulate the index with ALTER FULLTEXT INDEX ... START FULL POPULATION.

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

Troubleshooting Guide: SQL Server Error 11102 – “The provider could not support a required row lookup interface”

Why This Error Happens

This error typically occurs when a linked server or OLE DB provider does not support the IID_IRowsetLocate interface required by SQL Server to perform row-level lookups during query execution. It is commonly triggered by outdated, corrupted, or improperly configured OLE DB providers (such as older Jet, ODBC, or third-party drivers) that lack full compliance with modern SQL Server 2025 querying interfaces. Additionally, incorrect provider options set on the linked server configuration can prevent SQL Server from negotiating the correct interface.

Step-by-Step Resolution Guide

Step 1: Verify and Update the OLE DB Provider

  • Open SQL Server Management Studio (SSMS) and navigate to Server Objects > Linked Servers > Providers.
  • Right-click the provider in question (e.g., MSDASQL, Microsoft.ACE.OLEDB.16.0) and check its current version.
  • Download and install the latest provider version compatible with Windows Server 2025 / Windows 11 from the official vendor source.
  • Restart the SQL Server service after installation: net stop MSSQLSERVER && net start MSSQLSERVER.

Step 2: Adjust Linked Server Provider Options

  • In SSMS, right-click the affected linked server under Server Objects > Linked Servers and select Properties.
  • Go to the Provider Options tab and ensure the following are checked:
  • Nested Queries
  • Level Zero Only (uncheck if currently enabled, as this can disable interface negotiation)
  • Click OK and test connectivity using:
  EXEC sp_testlinkedserver 'YourLinkedServerName';

Step 3: Modify the Query to Avoid Row Lookup Dependency

  • Rewrite problematic queries that rely on OPENROWSET or OPENQUERY with row-by-row cursor operations.
  • Replace cursor-based lookups with set-based JOIN operations where possible.
  • Example fix:
  -- Instead of a cursor-based lookup against the linked server
  SELECT * FROM OPENQUERY(YourLinkedServerName, 'SELECT * FROM TableName');

Step 4: Reconfigure or Recreate the Linked Server

  • If the provider still fails, drop and recreate the linked server with explicit parameters:
  EXEC sp_dropserver 'YourLinkedServerName', 'droplogins';
  EXEC sp_addlinkedserver 
      @server = 'YourLinkedServerName', 
      @provider = 'MSOLEDBSQL', 
      @datasrc = 'TargetServerName';
  • Ensure the provider MSOLEDBSQL (Microsoft OLE DB Driver for SQL Server) is installed, as it fully supports required row lookup interfaces in SQL Server 2025.

Alternative or Verification Steps

  • Run EXEC sp_linkedservers; to confirm the linked server is listed and reachable, then execute a test query via OPENQUERY to confirm the row lookup error no longer appears.
  • If the issue persists, switch the data access method entirely to PolyBase or Linked Server with MSOLEDBSQL only, as legacy providers (like SQLNCLI or Jet) are deprecated and unsupported in Windows Server 2025 environments.

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

Troubleshooting Guide: SQL Server Error 11048 (“There was a recoverable Getting Data error”)

Why This Error Happens

Error 11048 in SQL Server 2025 typically occurs when the Database Mirroring or Always On Availability Groups transport layer experiences a temporary interruption while streaming log records between the primary and secondary replicas. This is most often caused by network instability, a firewall or port conflict blocking the mirroring endpoint (default TCP 5022), or insufficient buffer/memory resources on the receiving replica causing packets to be dropped mid-stream. Because SQL Server marks this as “recoverable,” the underlying transport layer (TCP) is expected to retry the connection automatically, but repeated occurrences indicate a persistent environmental issue rather than a one-time blip.

Step-by-Step Resolution Guide

Step 1: Verify the Database Mirroring Endpoint Configuration

  • Open SQL Server Management Studio (SSMS) and run SELECT * FROM sys.database_mirroring_endpoints; to confirm the endpoint is in a STARTED state.
  • Check that the endpoint port (default 5022) matches on both the primary and secondary replicas.
  • Confirm the endpoint owner has CONNECT permission: GRANT CONNECT ON ENDPOINT::[Mirroring_Endpoint] TO [DOMAIN\ServiceAccount];

Step 2: Check Windows Firewall and Network Path

  • On Windows Server 2025 / Windows 11, open Windows Defender Firewall with Advanced Security.
  • Add an inbound rule allowing TCP traffic on port 5022 (or your custom mirroring port) for the sqlservr.exe process.
  • Run Test-NetConnection -ComputerName <SecondaryServerName> -Port 5022 in PowerShell from the primary node to confirm connectivity.
  • Review any intermediate network hardware (load balancers, VPN tunnels) for packet loss or MTU mismatch issues.

Step 3: Review SQL Server Error Logs and Extended Events

  • Navigate to the SQL Server log directory, typically C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Log\ERRORLOG.
  • Search for repeated instances of Error 11048 alongside corresponding Error 1479 or 1443 messages, which indicate session termination.
  • Enable the AlwaysOn_health Extended Events session if not already running: ALTER EVENT SESSION AlwaysOn_health ON SERVER STATE = START;

Step 4: Adjust Mirroring Timeout and Network Buffer Settings

  • If the issue stems from high-latency WAN links, increase the mirroring timeout threshold:
    ALTER DATABASE [YourDatabase] SET PARTNER TIMEOUT 20;
  • On the network adapter properties (Windows Server 2025), disable “TCP Chimney Offload” and verify “Receive Side Scaling (RSS)” is enabled to improve throughput stability.

Step 5: Restart the Mirroring Session or Failover Cluster Resource

  • If errors persist, suspend and resume the mirroring session:
    ALTER DATABASE [YourDatabase] SET PARTNER SUSPEND; followed by ALTER DATABASE [YourDatabase] SET PARTNER RESUME;
  • For Always On Availability Groups, restart the related cluster resource in Failover Cluster Manager to force a clean re-synchronization.

Alternative or Verification Steps

  • Confirm resolution by monitoring sys.dm_db_mirroring_connections or the Always On dashboard in SSMS for a stable “SYNCHRONIZED” state with no new 11048 entries over a 24-hour period.
  • If the error continues despite network and configuration fixes, consider rebuilding the mirroring endpoint entirely (DROP ENDPOINT then recreate) as corrupted endpoint metadata can also trigger this recoverable transport error.

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

Troubleshooting Guide: SQL Server Error 11100 — “Conflicts Occurred with Other Properties or Requirements”

Why This Error Happens

Error 11100 typically occurs when the SQL Server Virtual Network Name (VNN) or resource provider encounters a conflicting configuration in the cluster, such as a duplicate IP address, DNS record mismatch, or an improperly released resource handle from a prior failover. This is common in Always On Availability Group listeners or Failover Cluster Instances (FCI) running on Windows Server 2025, where the Cluster Service and SQL Server resource DLL disagree on dependency states. Corrupted cluster database entries or stale network provider caches can also trigger this conflict during resource validation.

Step-by-Step Resolution Guide

Step 1: Validate the Cluster Network Configuration

  • Open Failover Cluster Manager and navigate to Networks.
  • Confirm there are no duplicate IP addresses assigned to the SQL Server Network Name resource.
  • Run Get-ClusterResource | Get-ClusterParameter in PowerShell to inspect current property values for conflicts.

Step 2: Clear Stale DNS and NetBIOS Records

  • Open Command Prompt as Administrator and run ipconfig /flushdns on all cluster nodes.
  • Verify the Virtual Network Name (VNN) resolves correctly using nslookup <VNN_Name>.
  • Remove any duplicate or orphaned DNS A-records in DNS Manager tied to the old listener name.

Step 3: Take the SQL Server Resource Offline and Reset Dependencies

  • In Failover Cluster Manager, right-click the SQL Server role and select Take Offline.
  • Navigate to the resource’s Properties > Dependencies tab and remove/re-add the correct IP Address and Network Name dependencies.
  • Bring the resource back online using Start-ClusterResource -Name "SQL Server".

Step 4: Rebuild the Cluster Resource if Conflict Persists

  • If the error recurs, delete the problematic resource via Remove-ClusterResource -Name "SQL Network Name".
  • Recreate the resource using Add-ClusterResource -Name "SQL Network Name" -ResourceType "Network Name" -Group "SQL Server (MSSQLSERVER)".
  • Reassign the correct IP and network parameters using Set-ClusterParameter.

Alternative or Verification Steps

  • Verify the fix by failing the SQL Server role over to another node using Move-ClusterGroup and confirming it comes online without Error 11100 in the Cluster Events log.
  • If the issue persists, run the Validate Cluster Configuration Wizard in Failover Cluster Manager to identify any remaining network or storage conflicts.

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

Troubleshooting Guide: SQL Server Error 11047 – Schema Validation Failure

Why This Error Happens

Error 11047 occurs when SQL Server 2025 attempts to apply an update, migration, or replication operation that does not align with the expected schema version stored in the system catalog. This is typically caused by a mismatch between the database compatibility level and the installed SQL Server build, a partially applied cumulative update that left system tables in an inconsistent state, or corrupted metadata in the sys.sysschobjs or related catalog views. In some cases, this also surfaces when a DACPAC/BACPAC deployment references schema objects that were modified outside of the standard schema versioning workflow.

Step-by-Step Resolution Guide

Step 1: Verify Database Compatibility Level and SQL Server Build

  • Open SQL Server Management Studio (SSMS) and connect to the target instance.
  • Run SELECT compatibility_level FROM sys.databases WHERE name = 'YourDatabaseName'; to check the current level.
  • Compare this against the installed build using SELECT @@VERSION; — ensure the compatibility level is supported by your SQL Server 2025 build (should be 170 or higher).
  • If mismatched, update it with ALTER DATABASE YourDatabaseName SET COMPATIBILITY_LEVEL = 170;

Step 2: Check for Incomplete Cumulative Update (CU) Installation

  • Navigate to Control Panel > Programs > Programs and Features on Windows Server 2025 / Windows 11 and confirm the latest CU for SQL Server 2025 is fully installed.
  • Cross-reference the installed version against Microsoft’s official build chart to confirm no partial patch state exists.
  • If an incomplete update is suspected, re-run the SQL Server Setup wizard and choose Repair from the maintenance menu.
  • Restart the SQL Server service afterward via services.msc or net stop MSSQLSERVER && net start MSSQLSERVER.

Step 3: Run DBCC CHECKDB to Rule Out Catalog Corruption

  • Execute DBCC CHECKDB ('YourDatabaseName') WITH NO_INFOMSGS, ALL_ERRORMSGS; in SSMS.
  • Review the output for any schema-related consistency errors (especially around system tables).
  • If corruption is found, run DBCC CHECKDB ('YourDatabaseName', REPAIR_REBUILD); in single-user mode to attempt a safe repair.
  • Avoid REPAIR_ALLOW_DATA_LOSS unless a verified backup exists, as this option can remove affected objects.

Step 4: Validate and Redeploy Schema via DACPAC

  • If the error originated from a DACPAC/BACPAC deployment, extract a fresh schema snapshot using SqlPackage.exe /Action:Extract /SourceConnectionString:"..." /TargetFile:"schema.dacpac".
  • Compare the extracted schema against your deployment script to identify unsupported object definitions (e.g., deprecated data types or unsupported indexing options in SQL Server 2025).
  • Redeploy using SqlPackage.exe /Action:Publish /SourceFile:"schema.dacpac" /TargetConnectionString:"..." after correcting discrepancies.

Step 5: Clear and Rebuild the Plan Cache (If Error Persists)

  • Run DBCC FREEPROCCACHE; to clear stale execution plans referencing outdated schema metadata.
  • Follow with DBCC DROPCLEANBUFFERS; in a non-production environment to force SQL Server to reload schema objects from disk.
  • Retry the original update operation that triggered Error 11047.

Alternative or Verification Steps

  • To verify the fix, re-run the original update/migration command and confirm Error 11047 no longer appears in the SQL Server Error Log (EXEC sp_readerrorlog 0, 1, '11047';).
  • If the issue persists after all steps, restore the database from a known-good backup taken prior to the last schema change, then reapply updates incrementally while monitoring the Event Viewer (Windows Logs > Application) for recurring Event ID 11047 entries.

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

Troubleshooting Guide: SQL Server Error 11045 – Insufficient Permission to Delete Row

Why This Error Happens

Error 11045 occurs when the executing user account lacks the DELETE permission on the target table or the underlying view, even if they have SELECT access to the same object. This commonly happens due to restrictive role memberships, missing object-level grants, or when a DELETE operation cascades through a view that enforces stricter permission checks than the base table. In some cases, Row-Level Security (RLS) predicates silently block the delete, which SQL Server surfaces as a permissions error rather than a filtering notice.

Step-by-Step Resolution Guide

Step 1: Verify Current User Permissions

  • Open SQL Server Management Studio (SSMS) and connect to the SQL Server 2025 instance.
  • Run the following query to check effective permissions for the user on the target table:
  SELECT * FROM fn_my_permissions('dbo.YourTableName', 'OBJECT');
  • Confirm whether DELETE appears in the result set. If it is missing, proceed to Step 2.

Step 2: Grant Explicit DELETE Permission

  • Connect using an account with db_owner or sysadmin privileges.
  • Execute the grant statement scoped to the specific table:
  GRANT DELETE ON dbo.YourTableName TO [DOMAIN\Username];
  • If the user operates through a role, add them to the appropriate role instead:
  ALTER ROLE db_datawriter ADD MEMBER [DOMAIN\Username];
  • Avoid granting db_owner broadly as a workaround; scope permissions to the minimum required.

Step 3: Check for Row-Level Security (RLS) Policies

  • Query sys.security_policies to determine if RLS is enabled on the database:
  SELECT * FROM sys.security_policies WHERE is_enabled = 1;
  • If a security predicate filters the row the user is attempting to delete, update the predicate function logic or add the user to the permitted security context.
  • Disable the policy temporarily only in a test environment to confirm RLS is the root cause:
  ALTER SECURITY POLICY YourPolicyName WITH (STATE = OFF);

Step 4: Validate Permissions on Underlying Views

  • If the delete operation targets a view rather than a base table, confirm DELETE permission exists on the view itself, not just the underlying table.
  • Run:
  GRANT DELETE ON dbo.YourViewName TO [DOMAIN\Username];
  • Ensure the view is updatable (single base table, no aggregates, no DISTINCT), as non-updatable views will always reject DELETE regardless of permissions.

Step 5: Review Windows Authentication and Group Policy

  • On Windows Server 2025, confirm the user’s Active Directory group membership hasn’t changed due to a recent Group Policy refresh.
  • Run gpupdate /force on the client machine if domain-level permission changes were made but not yet propagated.
  • Restart the SQL Server service only if permission caching issues persist after AD sync:
  Restart-Service -Name MSSQLSERVER -Force

Alternative or Verification Steps

  • Verify the fix by having the affected user re-attempt the DELETE statement and confirm no 11045 error appears in SSMS or the SQL Server Error Log (Management > SQL Server Logs).
  • As an alternative, use EXECUTE AS USER = 'DOMAIN\Username' in a test query window to impersonate the user and validate permissions without requiring them to log in directly.

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

Troubleshooting Guide: Error 11046 in Microsoft SQL Server 2025

Why This Error Happens

Error 11046 occurs when a replicated or immediate-update table attempts a DELETE operation but hits a resource limit on the server, typically related to lock exhaustion, transaction log space, or the max text repl size configuration setting. This is common in merge replication or immediate-updating subscription scenarios where the server cannot commit the deletion because it exceeds allocated memory, locks, or row-size thresholds. Corrupted replication metadata or an improperly tuned locks configuration value can also trigger this behavior on Windows Server 2025 / Windows 11 hosts.

Step-by-Step Resolution Guide

Step 1: Verify and Increase the Locks Configuration

  • Open SQL Server Management Studio (SSMS) and connect to the affected instance.
  • Run sp_configure 'locks' to check the current limit (default is 0, meaning dynamic allocation).
  • If set to a fixed low value, run:
  EXEC sp_configure 'show advanced options', 1;
  RECONFIGURE;
  EXEC sp_configure 'locks', 0;
  RECONFIGURE;
  • Restart the SQL Server service via Services.msc or net stop MSSQLSERVER && net start MSSQLSERVER.

Step 2: Check Transaction Log and Disk Space

  • Navigate to the data/log file directory, typically C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\DATA.
  • Confirm available disk space is above 15% free; low space can cause immediate-update deletes to fail.
  • Run DBCC SQLPERF(LOGSPACE); to check log file utilization per database.
  • If the log is near capacity, perform a log backup:
  BACKUP LOG [YourDatabase] TO DISK = 'D:\Backups\YourDB_Log.bak';

Step 3: Review Replication Settings and Row Size Limits

  • Open Replication Monitor in SSMS and inspect the publication involved in the error.
  • Check the max text repl size setting:
  EXEC sp_configure 'max text repl size';
  • If the value is too restrictive for large row deletions, increase it:
  EXEC sp_configure 'max text repl size', 2147483647;
  RECONFIGURE;
  • Validate replication agent jobs in SQL Server Agent are running without errors.

Step 4: Rebuild Replication Metadata (If Issue Persists)

  • Stop all replication agents via Replication Monitor.
  • Run sp_browsereplcmds to identify any orphaned or corrupted replicated commands tied to the failing table.
  • If corruption is confirmed, drop and re-create the subscription:
  EXEC sp_dropsubscription @publication = 'YourPub', @article = 'all', @subscriber = 'all';
  • Re-initialize the subscription through the New Subscription Wizard in SSMS.

Alternative or Verification Steps

  • After applying fixes, manually execute the original DELETE statement against the affected table and confirm it completes without Error 11046.
  • As an alternative, temporarily disable immediate-update subscriptions and switch to queued updating mode to bypass the limit while investigating further with Microsoft Support.

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

Troubleshooting Guide: Error 11044 – “The Provider Ran Out of Memory and Could Not Fetch the Row”

Why This Error Happens

This error typically occurs when the OLE DB provider used by SQL Server 2025 encounters insufficient memory resources while attempting to retrieve a large row or dataset, often due to memory pressure on the server or a misconfigured memory allocation limit. It can also stem from fragmented memory caused by long-running queries, oversized result sets with large object (LOB) data types, or outdated provider drivers that mismanage buffer allocation. In some cases, this is exacerbated by Windows Server 2025 memory management settings conflicting with SQL Server’s “Max Server Memory” configuration.

Step-by-Step Resolution Guide

Step 1: Verify and Adjust SQL Server Memory Allocation

  • Open SQL Server Management Studio (SSMS) and connect to the instance.
  • Run EXEC sp_configure 'max server memory (MB)'; to check the current limit.
  • Ensure the value leaves adequate memory for the OS (typically reserve 4-8 GB for Windows Server 2025 itself).
  • Update if necessary: EXEC sp_configure 'max server memory (MB)', 16384; RECONFIGURE;

Step 2: Update or Reinstall the OLE DB Provider

  • Navigate to Control Panel > Programs > Programs and Features on Windows Server 2025 / Windows 11.
  • Locate “Microsoft OLE DB Driver for SQL Server” and check the version against the latest release on the Microsoft Download Center.
  • Uninstall the outdated driver and reinstall using the latest MSI package.
  • Restart the SQL Server service via services.msc after installation.

Step 3: Review Query Design for Large Row Fetches

  • Open the query or SSIS package triggering the error in SSMS or Visual Studio.
  • Check for columns using VARCHAR(MAX), NVARCHAR(MAX), or VARBINARY(MAX) that may be returning excessively large row sizes.
  • Break large batch queries into smaller paginated fetches using OFFSET-FETCH syntax.
  • Example: SELECT * FROM LargeTable ORDER BY ID OFFSET 0 ROWS FETCH NEXT 1000 ROWS ONLY;

Step 4: Check Windows Server Virtual Memory and Paging File Settings

  • Go to System Properties > Advanced > Performance Settings > Advanced > Virtual Memory.
  • Ensure the paging file size is set to “System Managed” or manually configured to at least 1.5x the physical RAM.
  • Apply changes and restart the server to allow new memory settings to take effect.

Step 5: Monitor Resource Usage with Performance Monitor

  • Launch perfmon.exe and add counters for SQL Server: Memory Manager > Total Server Memory and Memory > Available MBytes.
  • Monitor during the failing query execution to confirm memory exhaustion coincides with the error.
  • If physical memory is consistently maxed out, consider adding RAM or scaling the server resources.

Alternative or Verification Steps

  • Re-run the original query or ETL job that previously failed and confirm Error 11044 no longer appears in the SQL Server Error Log (SQL Server Logs in SSMS Object Explorer).
  • As an alternative, if the issue persists, switch the connection provider from OLE DB to the Microsoft ODBC Driver for SQL Server, which handles large row fetches with improved memory management in SQL Server 2025.

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

Troubleshooting Guide: Error 11042 in Microsoft SQL Server 2025

Why This Error Happens

This error occurs when an OLE DB client application, such as SQL Server Management Studio using the client cursor engine, attempts to delete more rows in a single batch than the rowset’s DBPROP_MAXPENDINGROWS property allows. Typically, this happens when a bulk delete operation on a large result set exceeds the default pending row buffer limit before the changes are committed to the server. This is a client-side cursor restriction rather than a database corruption or permissions issue, and it is commonly triggered when using keyset or dynamic cursors against large tables.

Step-by-Step Resolution Guide

Step 1: Reduce the Batch Size of Delete Operations

  • Instead of deleting thousands of rows via a grid-based cursor, break the delete operation into smaller batches using a TOP (n) clause.
  • Example: DELETE TOP (500) FROM YourTable WHERE Condition = 'Value';
  • Repeat the batch execution in a loop until all target rows are removed.

Step 2: Switch to a Server-Side Cursor or Direct T-SQL Execution

  • Avoid using the SSMS “Edit Top 200 Rows” grid feature for bulk deletions, as it relies on client-side cursors with pending row limits.
  • Run delete statements directly in a New Query window instead of through the results grid.
  • If using an application with ADO/OLE DB, modify the connection string or recordset properties to use adUseServer instead of adUseClient for the CursorLocation property.

Step 3: Adjust the DBPROP_MAXPENDINGROWS Property in Custom Applications

  • If you are developing a custom OLE DB consumer application, explicitly set the DBPROP_MAXPENDINGROWS property to a higher value (or 0 for unlimited) before opening the rowset.
  • Locate this in your connection initialization code where IRowsetChange or IDBProperties interfaces are configured.
  • Recompile and redeploy the application after increasing this limit.

Step 4: Update SQL Server Native Client or OLE DB Driver

  • Navigate to Control Panel > Programs and Features on Windows Server 2025 and verify the version of the “Microsoft OLE DB Driver for SQL Server.”
  • Download and install the latest driver update compatible with SQL Server 2025 from the Microsoft Download Center.
  • Restart the SQL Server service via services.msc after the driver update to ensure the new component is loaded.

Alternative or Verification Steps

  • To verify the fix, execute the delete operation again under the same conditions; the transaction should complete without triggering the DBPROP_MAXPENDINGROWS dialog or error 11042.
  • If the error persists in SSMS specifically, check Tools > Options > SQL Server Object Explorer > Commands and ensure the “Value for data changes” setting under batch size limits is increased or set to a non-restrictive number.

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

Troubleshooting Guide: SQL Server Error 11043 – “The Row Has a Storage Object Open”

Why This Error Happens

Error 11043 occurs when SQL Server attempts to perform an operation on a row (such as a schema change, update, or delete) while a separate in-progress transaction still has an active handle on a large object (LOB) storage pointer—typically from a .WRITE() operation on varchar(max), varbinary(max), or XML data types. This conflict arises because the storage object handle has not been explicitly closed or committed before a conflicting operation attempts to access the same row. It is frequently triggered by application code that leaves connections or transactions open longer than necessary when streaming large data into a table.

Step-by-Step Resolution Guide

Step 1: Identify the Blocking Session Holding the Storage Handle

  • Run the following query to find open transactions with uncommitted LOB writes:
  SELECT session_id, transaction_id, open_tran, status, last_request_start_time
  FROM sys.dm_exec_sessions s
  JOIN sys.dm_tran_session_transactions t ON s.session_id = t.session_id
  WHERE open_tran = 1;
  • Note the session_id for any connection performing .WRITE() chunked updates, as these are the most common culprits.
  • Cross-reference with sys.dm_exec_requests to confirm if the session is idle but still holding the transaction open.

Step 2: Terminate or Commit the Orphaned Transaction

  • If the session is abandoned (e.g., due to an application crash or connection pool issue), safely terminate it:
  KILL <session_id>;
  • If the session is legitimate but stalled, issue a COMMIT TRANSACTION or ROLLBACK TRANSACTION manually from that connection context if accessible.
  • Avoid using KILL indiscriminately in production; verify the session is not mid-critical-write first.

Step 3: Review Application Code for Improper LOB Handling

  • Audit application logic (C#, Java, or ODBC drivers) for any use of UPDATETEXT, WRITETEXT, or .WRITE() methods on large object columns.
  • Ensure every connection that opens a streaming write to a LOB column explicitly calls Connection.Commit() or closes the SqlDataReader/Stream object immediately after the write completes.
  • Wrap LOB write operations in TRY...CATCH blocks with guaranteed ROLLBACK in the CATCH block to prevent orphaned handles during exceptions.

Step 4: Update SQL Server Native Client / ODBC Drivers

  • On Windows Server 2025 and Windows 11 clients, navigate to Control Panel > Programs > Programs and Features and verify the installed version of the Microsoft ODBC Driver for SQL Server.
  • Update to the latest driver version compatible with SQL Server 2025, as older driver versions (pre-18.x) have known bugs mishandling LOB pointer closures.
  • Restart the SQL Server service after driver updates: Restart-Service MSSQLSERVER via PowerShell (run as Administrator).

Alternative or Verification Steps

  • Verify the Fix: Re-run the operation that previously failed (e.g., the UPDATE, ALTER TABLE, or DELETE statement) and confirm Error 11043 no longer appears in the SQL Server Error Log (Management > SQL Server Logs in SSMS).
  • Alternative Approach: If the error persists under high concurrency, consider refactoring LOB updates to use MAX data type streaming via SqlClient.SqlBulkCopy or Filestream storage, which reduces the likelihood of long-held storage object handles blocking row-level operations.

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

Troubleshooting Guide: SQL Server Error 11040 – Row Deletion Violates Integrity Constraints

Why This Error Happens

This error occurs when SQL Server 2025 attempts to delete a row that is still referenced by a foreign key constraint in another table, or when a CHECK constraint prevents the deletion to preserve referential integrity. It can also surface due to orphaned constraint metadata left behind after an incomplete schema migration or a corrupted system catalog view (sys.foreign_keys). In some cases, triggers configured with INSTEAD OF DELETE logic interfere with cascading delete operations, causing the engine to reject the transaction.

Step-by-Step Resolution Guide

Step 1: Identify the Conflicting Constraint

  • Open SQL Server Management Studio (SSMS) 21 and run the following query to locate the dependency:
SELECT 
    fk.name AS ForeignKey, 
    OBJECT_NAME(fk.parent_object_id) AS ChildTable, 
    OBJECT_NAME(fk.referenced_object_id) AS ParentTable 
FROM sys.foreign_keys AS fk 
WHERE fk.referenced_object_id = OBJECT_ID('YourTableName');
  • Note the specific ChildTable returned, as this is where the referencing rows reside.

Step 2: Clean Up Orphaned Child Records

  • Navigate to the identified child table and delete or update the orphaned rows referencing the parent key first.
  • Alternatively, if business logic allows it, modify the constraint to cascade deletes automatically:
ALTER TABLE ChildTable 
DROP CONSTRAINT FK_ConstraintName; 

ALTER TABLE ChildTable 
ADD CONSTRAINT FK_ConstraintName 
FOREIGN KEY (ColumnName) REFERENCES ParentTable(ColumnName) 
ON DELETE CASCADE;

Step 3: Check for Blocking Triggers

  • Open SSMS and expand the specific table under Databases > YourDB > Tables > TableName > Triggers.
  • Verify if an INSTEAD OF DELETE trigger is intercepting the command and disable it temporarily for testing:
DISABLE TRIGGER TriggerName ON TableName;

Step 4: Verify Windows Server Permissions and File Integrity

  • On Windows Server 2025, ensure the SQL Server service account has full read/write access to the .mdf and .ldf files located in C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\DATA\.
  • Run DBCC CHECKDB('YourDatabaseName') to rule out corruption affecting the constraint metadata.

Alternative or Verification Steps

  • Re-run the original DELETE statement in SSMS; if Error 11040 no longer appears, the fix was successful.
  • If the error persists, use SQL Server Profiler to trace the exact transaction and confirm whether a secondary, hidden foreign key relationship exists in a linked schema.

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

Troubleshooting Guide: Error 11041 – Invalid Row Handle in SQL Server 2025

Why This Error Happens

Error 11041 occurs when an application attempts to access a row handle through the OLE DB or ODBC API that is either stale, already released, or was never properly bound to the current thread’s execution context. This typically happens due to improper cursor management in application code, concurrency conflicts where a row was modified or deallocated by another process before the current thread could access it, or a mismatch between the thread that created the row handle and the thread attempting to use it. In some cases, this can also surface due to corrupted extended stored procedures or outdated OLE DB providers interacting with SQL Server 2025’s updated API layer.

Step-by-Step Resolution Guide

Step 1: Verify Cursor and Connection Threading Model

  • Check the application code for any multi-threaded access to the same ODBC/OLE DB connection handle without proper synchronization (mutex/locking).
  • Ensure that row handles are not shared across threads; each thread should maintain its own connection and cursor context.
  • Review connection pooling settings in your application’s connection string to confirm Pooling=True is not causing handle reuse conflicts.

Step 2: Update and Validate OLE DB / ODBC Drivers

  • Navigate to Control Panel > ODBC Data Sources (64-bit) and confirm the driver version is MSOLEDBSQL19 or later, which is required for full compatibility with SQL Server 2025.
  • Download the latest driver from the official Microsoft Download Center if an outdated version (such as SQLNCLI or older MSOLEDBSQL builds) is detected.
  • Restart the SQL Server (MSSQLSERVER) service after installation via services.msc on Windows Server 2025.

Step 3: Rebuild Affected Stored Procedures or Extended Procedures

  • Run sp_helptext on any extended stored procedures (xp_) referenced in the failing transaction to check for deprecated row-handle logic.
  • Drop and recreate any procedures using sys.sp_OAMethod or legacy OLE Automation calls, as these are common triggers for handle invalidation in 2025 builds.
  • Execute DBCC FREEPROCCACHE to clear any cached execution plans that may be referencing the invalid handle.

Step 4: Check for Row-Level Locking or Isolation Conflicts

  • Query sys.dm_tran_locks to identify if another session is holding an incompatible lock on the row in question.
  • Adjust the transaction isolation level to READ COMMITTED SNAPSHOT using:
  ALTER DATABASE [YourDB] SET READ_COMMITTED_SNAPSHOT ON;
  • Confirm no long-running transactions are holding row locks via sp_who2 before re-attempting the query.

Alternative or Verification Steps

  • To verify the fix, re-run the original query or application transaction under SQL Server Profiler/Extended Events and confirm no Error 11041 is logged in the Errors and Warnings event class.
  • If the issue persists, as a fallback, bypass server-side cursors entirely by switching the application’s cursor type to a client-side cursor (adUseClient in ADO or SQL_CURSOR_STATIC in ODBC), which avoids row-handle dependency altogether.

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

Troubleshooting Guide: Error 11039 — DBPROPCHANGEINSERTEDROWS VARIANTFALSE

Why This Error Happens

This error occurs when a linked server OLE DB provider does not support notification of row changes after an INSERT operation has already completed, which is controlled by the DBPROPCHANGEINSERTEDROWS property. SQL Server 2025 attempts to retrieve the final state of inserted rows (such as identity values, computed columns, or triggers-modified data), but because the provider reports this property as VARIANTFALSE, it cannot guarantee the returned data matches what was actually committed. This is commonly seen when using distributed queries or linked servers with providers like older OLE DB drivers, Microsoft.ACE.OLEDB, or third-party providers that do not fully implement the rowset change notification interface required by SQL Server’s four-part name INSERT operations.

Step-by-Step Resolution Guide

Step 1: Identify the Linked Server and Provider in Use

  • Run sp_linkedservers in SSMS to list all configured linked servers on the instance.
  • Check the providername column to confirm which OLE DB provider is being used for the failing INSERT statement.
  • Cross-reference this with the query that triggered Error 11039 in the SQL Server error log (located at C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Log\ERRORLOG on Windows Server 2025).

Step 2: Update or Replace the OLE DB Provider

  • Navigate to Server Objects > Linked Servers > Providers in SSMS and right-click the provider in question.
  • Select Properties and ensure “Allow InProcess” is checked only for trusted, updated providers.
  • Download and install the latest version of the provider (e.g., Microsoft OLE DB Driver 19/20 for SQL Server) from the official Microsoft Download Center, replacing deprecated drivers like SQLNCLI or legacy ACE drivers.

Step 3: Modify the INSERT Statement to Avoid Rowset Change Dependency

  • Rewrite the INSERT … SELECT statement to avoid relying on OUTPUT clauses or triggers that require row-change tracking on the remote provider.
  • Use SET NOCOUNT ON combined with a direct INSERT without OUTPUT INTO against the linked server to bypass the dependency on DBPROP_CHANGEINSERTEDROWS.
  • If OUTPUT is required, stage the data locally first using OPENQUERY instead of a direct four-part name INSERT.

Step 4: Adjust Linked Server Provider Options via T-SQL

  • Execute EXEC sp_serveroption 'YourLinkedServerName', 'rpc out', true; to ensure RPC is enabled if the provider supports remote procedure calls instead of rowset-based inserts.
  • Run EXEC master.dbo.sp_MSset_oledb_prop N'ProviderName', N'DBPROP_CHANGEINSERTEDROWS', 1; if the provider exposes this as a configurable property (verify support in provider documentation first, as not all providers allow runtime modification).

Alternative or Verification Steps

  • Re-run the original INSERT statement against the linked server and confirm Error 11039 no longer appears in SSMS or the ERRORLOG; check that row counts match expected values using SELECT @@ROWCOUNT.
  • As a fallback, route the data through SSIS (SQL Server Integration Services) with an OLE DB Destination component instead of a direct linked server INSERT, since SSIS handles provider rowset limitations more gracefully than native T-SQL distributed queries.

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

Why This Error Happens

Error 11037 occurs when a client-side cursor (typically through OLE DB or ODBC) attempts to refresh or re-fetch a row that has already been marked for deletion in the underlying result set buffer but has not yet been synchronized with the data source. This is commonly triggered by concurrency conflicts where multiple sessions or application threads are manipulating the same rowset simultaneously, or when an application’s cursor library retains a stale cached row reference after a DELETE statement commits. In Microsoft SQL Server 2025 running on Windows Server 2025 or Windows 11, this is frequently exacerbated by outdated MDAC/OLE DB provider versions or improperly configured cursor concurrency options (such as using optimistic concurrency without proper row-versioning support).

Step-by-Step Resolution Guide

Step 1: Update the Data Access Provider and Drivers

  • Verify the installed version of the Microsoft OLE DB Driver for SQL Server (MSOLEDBSQL) via Control Panel > Programs and Features.
  • Download and install the latest driver from the official Microsoft Download Center, as legacy SQLOLEDB or SQLNCLI drivers are deprecated and known to mishandle pending-delete row states.
  • Restart the application and the SQL Server (MSSQLSERVER) service after installation to ensure the new provider binaries are loaded.

Step 2: Review and Adjust Cursor Concurrency Settings

  • Open the application’s connection string or .udl file and check the Cursor Location and LockType properties.
  • Change LockType from adLockOptimistic to adLockPessimistic for critical update/delete operations to prevent race conditions on row buffers.
  • If using ADO.NET, ensure SqlDataAdapter.Update() calls are followed by a Fill() refresh rather than relying on cached DataRow states.

Step 3: Inspect for Orphaned Transactions or Locking Conflicts

  • Run the following query in SQL Server Management Studio (SSMS) to check for blocking sessions:
  SELECT * FROM sys.dm_exec_requests WHERE blocking_session_id <> 0;
  • Identify any long-running transactions holding locks on the target table and terminate them using KILL <session_id> if they are confirmed as orphaned.
  • Ensure READ_COMMITTED_SNAPSHOT isolation level is enabled on the database to reduce row-versioning conflicts:
  ALTER DATABASE [YourDB] SET READ_COMMITTED_SNAPSHOT ON;

Step 4: Clear Application-Level Cache and Rebuild Rowset

  • Close the application instance completely and clear any local cache files (common in reporting or ETL tools stored under %LOCALAPPDATA%\Temp).
  • Reopen the application and re-run the query from scratch to force a fresh cursor population rather than resuming a stale session.

Alternative or Verification Steps

  • Verify the Fix: Re-run the original delete/update operation and confirm Error 11037 no longer appears in the SQL Server Error Log (Management > SQL Server Logs in SSMS) or the Windows Event Viewer under Application Logs.
  • Alternative Solution: If the error persists, switch the application’s data access method from server-side cursors to a lightweight, forward-only “firehose” cursor (adOpenForwardOnly), which bypasses the pending-delete buffer logic entirely.

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

Why This Error Happens

Error 11038 occurs when a cursor-based operation (typically FETCH against a keyset or dynamic cursor) attempts to read a row that has been inserted into the cursor’s result set but whose transaction has not yet fully committed or synchronized with the cursor’s keyset table. This is common when application code uses optimistic concurrency with server-side cursors and attempts to re-fetch a row immediately after an INSERT, before SQL Server has finished populating the internal keyset metadata. It can also surface due to race conditions in multi-threaded applications issuing rapid INSERT-then-FETCH sequences against the same cursor handle.

Step-by-Step Resolution Guide

Step 1: Identify the Offending Cursor Operation

  • Enable SQL Server Profiler or Extended Events on the instance and filter for RPC:Completed and Cursor: Open events.
  • Capture the exact T-SQL batch or stored procedure issuing sp_cursorfetch or FETCH immediately after an INSERT statement.
  • Check application logs (IIS/.NET trace, ODBC driver logs) for the exact timestamp correlating with Error 11038.

Step 2: Adjust Cursor Type and Concurrency Settings

  • Open the application’s connection string or ADO.NET/ODBC data access layer and review the CursorType property.
  • Change from adOpenKeyset or adOpenDynamic to adOpenStatic or adOpenForwardOnly where real-time row visibility isn’t required:
  cmd.CommandType = CommandType.StoredProcedure;
  cursor.CursorType = CursorTypeEnum.adOpenStatic;
  • If using raw T-SQL cursors, modify the DECLARE CURSOR statement to use INSENSITIVE or STATIC instead of KEYSET:
  DECLARE my_cursor CURSOR STATIC FOR
  SELECT * FROM dbo.YourTable;

Step 3: Introduce a Commit/Sync Delay or Explicit Transaction Boundary

  • Wrap the INSERT statement in an explicit transaction with COMMIT TRANSACTION executed before any subsequent FETCH:
  BEGIN TRANSACTION;
  INSERT INTO dbo.YourTable (Col1, Col2) VALUES (@Val1, @Val2);
  COMMIT TRANSACTION;
  • Ensure SET NOCOUNT ON and SET IMPLICIT_TRANSACTIONS OFF are configured correctly in the session to avoid orphaned open transactions.
  • On Windows Server 2025, confirm the SQL Server service account has no pending Group Policy-forced session timeouts (Local Security Policy > Network security: Force logoff) that could interrupt long-running cursor transactions.

Step 4: Update SQL Server Native Client / ODBC Driver

  • Navigate to Control Panel > Programs > Programs and Features on Windows Server 2025 / Windows 11 and verify the installed version of “Microsoft ODBC Driver for SQL Server” or “SQL Server Native Client.”
  • Download and install the latest driver matching SQL Server 2025 from the Microsoft Download Center, as older drivers mishandle keyset cursor row-visibility timing.
  • Restart the application pool (IIS) or application service after the driver update to ensure the new DLLs (msodbcsql18.dll or newer) are loaded.

Alternative or Verification Steps

  • Re-run the original workflow (INSERT followed immediately by FETCH/UPDATE) under SQL Server Profiler and confirm Error 11038 no longer appears in the Exception event class.
  • If the error persists, bypass cursors entirely by refactoring the logic to use a set-based MERGE or OUTPUT clause to capture inserted rows directly, eliminating the pending-row race condition altogether:
  INSERT INTO dbo.YourTable (Col1, Col2)
  OUTPUT INSERTED.*
  VALUES (@Val1, @Val2);

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

Troubleshooting Guide: SQL Server Error 11034 — “Deletion of the row was canceled during notification”

Why This Error Happens

This error occurs when a trigger (typically an INSTEAD OF or AFTER DELETE trigger) associated with a Query Notification or Service Broker event explicitly cancels the delete operation, often via a ROLLBACK statement inside the trigger logic. It can also surface when the underlying notification queue tied to a SQL Server Service Broker dialog has corrupted metadata or when permissions on the SEND or RECEIVE operations for the notification queue are misconfigured. Additionally, in SQL Server 2025 running on Windows Server 2025/Windows 11, this can be triggered by Extended Events or CDC (Change Data Capture) jobs interfering with notification delivery mid-transaction.

Step-by-Step Resolution Guide

Step 1: Identify the Offending Trigger or Notification Subscription

  • Run sp_helptrigger 'YourTableName' in SQL Server Management Studio (SSMS) to list all triggers bound to the affected table.
  • Check trigger definitions for explicit ROLLBACK TRANSACTION or RAISERROR statements that may be canceling the delete.
  • Query sys.dm_qn_subscriptions to view active Query Notification subscriptions tied to the table.

Step 2: Inspect and Repair the Service Broker Queue

  • Open SSMS and navigate to Databases > YourDatabase > Service Broker > Queues.
  • Run the following to check queue health:
  SELECT * FROM sys.transmission_queue;
  SELECT * FROM sys.service_queues WHERE is_enqueue_enabled = 0;
  • If the queue is disabled or stuck, re-enable it using:
  ALTER QUEUE YourQueueName WITH STATUS = ON;
  • Restart the Service Broker if necessary: ALTER DATABASE YourDatabase SET ENABLE_BROKER;

Step 3: Validate Permissions on Notification Objects

  • Confirm the SQL Server service account (visible in Services.msc on Windows Server 2025) has SEND and RECEIVE permissions on the relevant Service Broker queue.
  • Grant missing permissions explicitly:
  GRANT RECEIVE ON QueueName TO [YourServiceAccount];
  GRANT SEND ON SERVICE::YourServiceName TO [YourServiceAccount];
  • Ensure the Windows account also has local security policy rights under Log on as a service (via secpol.msc).

Step 4: Disable or Rewrite the Problematic Trigger Logic

  • If the trigger is canceling deletes unintentionally, modify the trigger to remove or conditionally bypass the ROLLBACK.
  • Test the corrected trigger in a staging environment before deploying to production:
  ALTER TRIGGER trg_YourTrigger ON YourTable
  AFTER DELETE
  AS
  BEGIN
      -- Updated logic without unconditional rollback
  END;

Step 5: Clear Corrupted Notification Cache (If Applicable)

  • Restart the SQL Server Service Broker task via SSMS or run:
  ALTER DATABASE YourDatabase SET DISABLE_BROKER;
  ALTER DATABASE YourDatabase SET ENABLE_BROKER;
  • This clears stale notification states that may be causing false cancellation signals.

Alternative or Verification Steps

  • Verify the fix by executing a manual DELETE statement on the affected table and confirming no Error 11034 appears in the SQL Server Error Log (SSMS > Management > SQL Server Logs).
  • If the issue persists, as a fallback, temporarily disable Query Notifications on the table using sp_helpdbfixedrole checks or switch application-side polling instead of notification-based triggers until root cause is fully resolved.

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

Troubleshooting Guide: SQL Server Error 11036 – Optimistic Concurrency Violation

Why This Error Happens

Error 11036 occurs when a rowset configured for optimistic concurrency detects that an underlying column value was modified by another transaction or process after the row was originally fetched or last resynchronized. This typically happens in client applications using OLE DB, ODBC, or ADO cursors where row versioning (timestamp/rowversion columns) is used to detect conflicts before allowing an update or delete. The error is a built-in concurrency safeguard rather than a corruption issue, but it can also surface due to stale cached result sets, improper cursor refresh logic, or missing rowversion/timestamp column synchronization in the client application.

Step-by-Step Resolution Guide

Step 1: Verify the Table’s Concurrency Column Configuration

  • Confirm the table has a rowversion (formerly timestamp) column that SQL Server uses to track row changes.
  • Run the following query to check: SELECT name, system_type_name FROM sys.dm_exec_describe_first_result_set(N'SELECT * FROM YourTableName', NULL, 0);
  • If missing, add one: ALTER TABLE YourTableName ADD RowVersionCol ROWVERSION;

Step 2: Refresh the Client-Side Cursor Before Update

  • Inspect the application or ETL job code (ADO, ODBC, OLE DB) for cursor types set to adOptimistic or SQL_CONCUR_ROWVER.
  • Force a Resync or re-fetch of the row immediately before attempting the update operation to pull the latest row version.
  • In ADO: call Recordset.Resync adAffectAll, adResyncAllValues prior to .Update.

Step 3: Check for Concurrent Transactions or Triggers Modifying the Row

  • Query active sessions using sp_who2 or SELECT * FROM sys.dm_exec_requests; to identify overlapping transactions touching the same table.
  • Review any AFTER UPDATE or INSTEAD OF triggers on the table that may silently modify the row (e.g., updating an audit column), which changes the rowversion unexpectedly.
  • Disable or adjust trigger logic if it’s causing unintended rowversion increments: DISABLE TRIGGER TriggerName ON YourTableName;

Step 4: Adjust Application Retry Logic

  • Implement a retry pattern in the client application that catches error 11036, re-fetches the current row, reapplies the business logic, and resubmits the update.
  • In connection string or driver settings on Windows Server 2025/Windows 11, ensure the OLE DB provider (e.g., MSOLEDBSQL19) is updated to the latest version to avoid known cursor-sync bugs.

Alternative or Verification Steps

  • To verify the fix, run the update operation again through the application and confirm no 11036 error is raised in SQL Server Profiler or Extended Events (filter on error_reported with error number 11036).
  • As an alternative, switch the cursor concurrency model from optimistic to adLockBatchOptimistic or pessimistic locking (adLockPessimistic) if conflicts remain frequent, though this will reduce concurrency performance.

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

Troubleshooting Guide: SQL Server Error 11033

Why This Error Happens

Error 11033 occurs when SQL Server’s row versioning or latch management detects that a row buffer was released back to the buffer pool while it still had an uncommitted or pending modification tied to it. This typically stems from in-memory OLTP (Hekaton) data corruption, a conflict between concurrent transactions accessing the same memory-optimized table, or a corrupted checkpoint file stream affecting memory-optimized filegroups. It can also surface after an improper shutdown or storage-level failure that left the in-memory table’s delta/data files in an inconsistent state.

Step-by-Step Resolution Guide

Step 1: Identify the Affected Database and Table

  • Check the SQL Server Error Log and Windows Event Viewer (Application log) for the full text of Error 11033, which usually includes the database ID and object ID.
  • Run the following query to resolve the IDs to names:
SELECT DB_NAME(db_id) AS DatabaseName, OBJECT_NAME(object_id, db_id) AS TableName
FROM sys.dm_db_xtp_object_stats
WHERE db_id = <DB_ID_FROM_LOG>;
  • Confirm whether the table is memory-optimized (In-Memory OLTP) by checking sys.tables for is_memory_optimized = 1.

Step 2: Check for Hardware and Storage Integrity Issues

  • Open Event Viewer > Windows Logs > System on Windows Server 2025 and look for disk or storage controller warnings (Event IDs 7, 11, 51, or 153) around the same timestamp.
  • Run CHKDSK against the volume hosting the memory-optimized filegroup container:
chkdsk D: /f /r
  • Verify the storage path for the MEMORYOPTIMIZEDDATA filegroup under SQL Server Management Studio (SSMS) > Database Properties > Filegroups.

Step 3: Run DBCC CHECKDB to Validate Database Consistency

  • Execute a full consistency check against the affected database:
DBCC CHECKDB ('YourDatabaseName') WITH ALL_ERRORMSGS, NO_INFOMSGS;
  • If corruption is confirmed in the memory-optimized filegroup, restore the database from the last known good backup rather than attempting repair, since DBCC CHECKDB cannot repair memory-optimized table corruption directly.
  • Review backup history under SSMS > Management > Maintenance Plans to locate the most recent full and transaction log backups.

Step 4: Restart the SQL Server Service to Clear In-Memory State

  • Open Services.msc on Windows Server 2025 / Windows 11 and restart the SQL Server (MSSQLSERVER) service (or the named instance service).
  • Alternatively, use PowerShell with elevated privileges:
Restart-Service -Name 'MSSQLSERVER' -Force
  • This forces SQL Server to reload and rebuild the memory-optimized tables from the checkpoint files and transaction log, clearing any transient in-memory inconsistency.

Step 5: Update SQL Server 2025 with the Latest Cumulative Update

  • Check your current build version:
SELECT @@VERSION;
  • Compare against the latest Cumulative Update (CU) listed on the Microsoft SQL Server release notes page, since Error 11033 has known fixes in several In-Memory OLTP engine patches.
  • Download and install the applicable CU via Microsoft Update Catalog or SQL Server Installation Center > Product Updates.

Alternative or Verification Steps

  • After applying the fix, re-run DBCC CHECKDB and monitor sys.dm_db_xtp_object_stats for a full business day to confirm Error 11033 does not reoccur in the SQL Server Error Log.
  • If the issue persists, export the memory-optimized table data to a disk-based staging table, drop and recreate the memory-optimized table/filegroup, and reload the data to eliminate any residual corruption in the Hekaton storage engine.

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

Troubleshooting Guide: SQL Server Error 11031

Why This Error Happens

Error 11031 in Microsoft SQL Server 2025 is an informational message that occurs when a DELETE operation completes successfully, but the client application or script is configured to surface server messages as errors due to logging or severity-level misconfiguration. This typically happens when PRINT statements, triggers, or custom error-handling logic in stored procedures use message IDs in a range that gets misinterpreted by the client’s error-handling layer (such as ODBC or OLE DB drivers) on Windows Server 2025 / Windows 11. It can also surface when SQL Server Agent job steps or SSIS packages are configured to treat all non-zero message severities as failures, even when the severity level indicates success rather than an actual error.

Step-by-Step Resolution Guide

Step 1: Verify the Actual Message Severity and State

  • Open SQL Server Management Studio (SSMS) and run the DELETE statement manually against the target table.
  • Check the Messages tab for the full text: “The row was successfully deleted. (1 row affected)” — confirm the severity level is 0 or 10 (informational), not a true error (severity 11+).
  • Run SELECT * FROM sys.messages WHERE message_id = 11031; to confirm this is a system-defined informational message rather than a blocking error.

Step 2: Review Client Driver and Connection String Settings

  • Navigate to your application’s connection configuration (e.g., ODBC Data Source Administrator on Windows Server 2025/Windows 11 via odbcad32.exe).
  • Check if the driver (SQL Server Native Client, ODBC Driver 18, or OLE DB Driver) has “Report Informational Messages as Errors” or similar flag enabled.
  • Disable this flag, or in application code, explicitly handle SqlInfoMessage events separately from SqlException events (for .NET applications using System.Data.SqlClient or Microsoft.Data.SqlClient).

Step 3: Adjust SQL Server Agent Job Step Logic (If Applicable)

  • Open SQL Server Agent > Jobs in SSMS, right-click the relevant job, and select Properties.
  • Under the Steps tab, edit the step running the delete logic and check the Advanced settings for “On Failure Action.”
  • Modify any TRY...CATCH blocks in your T-SQL code so that THROW or RAISERROR is only triggered for severity levels 11 and above, preventing informational messages like 11031 from halting job execution.

Step 4: Clear Cached Execution Plans and Restart the SQL Service

  • Open PowerShell as Administrator on Windows Server 2025 and run DBCC FREEPROCCACHE; within an SSMS query window first to rule out stale plan issues.
  • If needed, restart the SQL Server service via Restart-Service -Name 'MSSQLSERVER' to ensure configuration changes to drivers or Agent settings take effect.

Alternative or Verification Steps

  • Re-run the original DELETE transaction through the application and confirm no exception is thrown in the application logs, while verifying in SSMS that the row count matches expected results.
  • If the issue persists, create a custom error-handling wrapper in your stored procedure using TRY...CATCH with ERROR_SEVERITY() > 10 as the condition for raising an actual exception, effectively filtering out informational noise like message 11031.

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

Why This Error Happens

This error occurs when a subscriber table configured for immediate-updating replication attempts to process a transaction while still flagged as being in immediate-update mode, typically due to a failed or interrupted synchronization between the Publisher and Subscriber. It commonly surfaces when the trigger-based update mechanism used by immediate-updating subscriptions encounters a mismatched transaction state, often caused by an incomplete rollback, a stale replication trigger, or a corrupted distribution agent job. In SQL Server 2025, this can also be triggered by permission issues on the linked server connection used to communicate updates back to the Publisher.

Step-by-Step Resolution Guide

Step 1: Verify Replication Agent Status

  • Open SQL Server Management Studio (SSMS) and navigate to Replication > Local Subscriptions.
  • Check the status of the Distribution Agent and Log Reader Agent for the affected publication.
  • Run the following query to confirm the table’s replication state:
  SELECT * FROM sys.sysmergearticles WHERE art_name = 'YourTableName';
  • If the agent shows a “Retrying” or “Failed” status, stop and restart it via the Job Activity Monitor.

Step 2: Reset the Immediate-Updating Trigger State

  • Disable immediate-updating subscriptions temporarily on the affected table using:
  EXEC sp_scriptpublicationcustomprocs @publication = 'YourPublicationName';
  • Manually drop and regenerate the sp_MSupd_ and sp_MSins_ triggers associated with the table by re-running the replication stored procedure generation script located in:
    C:\Program Files\Microsoft SQL Server\160\COM\
  • Restart the SQL Server Agent service from Services.msc (Windows Server 2025) to clear cached trigger states.

Step 3: Validate Linked Server and Permissions

  • Confirm that the linked server used for immediate updating (typically pointing back to the Publisher) has the correct RPC and RPC OUT settings enabled:
  EXEC sp_serveroption 'YourLinkedServerName', 'rpc', 'true';
  EXEC sp_serveroption 'YourLinkedServerName', 'rpc out', 'true';
  • Ensure the SQL Server service account has db_owner rights on both the Publisher and Subscriber databases.
  • Re-run the failed transaction manually to confirm the mode conflict is cleared.

Step 4: Reinitialize the Subscription (If Needed)

  • If the error persists, reinitialize the subscription from SSMS by right-clicking the subscription and selecting Reinitialize.
  • This forces a fresh snapshot application, clearing any residual immediate-update flags on the table structure.

Alternative or Verification Steps

  • To verify the fix, perform a test UPDATE statement on the affected table and confirm the transaction replicates to the Publisher without throwing Error 11032.
  • If the issue persists after reinitialization, consider migrating the publication type from Immediate-Updating Subscriptions to Peer-to-Peer Transactional Replication, as immediate-updating subscribers are deprecated and increasingly unstable in SQL Server 2025.

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

Troubleshooting Guide: SQL Server Error 11014 — “The Column Used the Default Value”

Why This Error Happens

Error 11014 typically occurs during BULK INSERT, BCP, or SSIS data load operations when the source data file does not contain a value for a mapped column, causing SQL Server to fall back to the column’s default constraint. This is often triggered by mismatched format files (.fmt or .xml), incorrect column mapping ordinals, or a source file that has fewer fields than the destination table schema expects. It can also surface when a column is explicitly skipped in the format file but still has DEFAULT or IDENTITY constraints configured in Microsoft SQL Server 2025.

Step-by-Step Resolution Guide

Step 1: Validate the Source Data File Structure

  • Open the source flat file (CSV, TXT) and confirm the actual number of delimited columns matches the destination table’s column count.
  • Check for trailing delimiters or missing fields in specific rows that may cause column-shifting during import.
  • Run notepad sourcefile.csv or use a text editor with column/row numbering to visually inspect field alignment.

Step 2: Review and Correct the Format File (.fmt/.xml)

  • Navigate to the format file location, typically stored alongside your BCP scripts (e.g., C:\SQLImport\Formats\table.fmt).
  • Verify that <COLUMN SOURCE> and <COLUMN SERVER> ordinal mappings in the XML format file align exactly with both the source file and destination table schema.
  • Regenerate the format file if necessary using:
  bcp YourDatabase.dbo.YourTable format nul -c -f C:\SQLImport\Formats\table.fmt -t, -T -S YourServerName

Step 3: Check Column Constraints in SQL Server Management Studio (SSMS)

  • Open SSMS, connect to your Windows Server 2025 instance, and expand Databases > YourDatabase > Tables > YourTable > Columns.
  • Right-click the affected column and select Modify to review any DEFAULT constraint bindings under Column Properties.
  • If the default value is unintended, remove it via:
  ALTER TABLE YourTable DROP CONSTRAINT DF_YourTable_ColumnName;

Step 4: Re-run the Import with Verbose Logging

  • Execute the BULK INSERT or BCP command again with error logging enabled to capture row-level details.
  • Use the -e flag with BCP to output an error file:
  bcp YourDatabase.dbo.YourTable in C:\SQLImport\sourcefile.csv -f C:\SQLImport\Formats\table.fmt -e C:\SQLImport\errors.log -T -S YourServerName
  • Review errors.log for the specific row/column numbers still defaulting.

Alternative or Verification Steps

  • After re-running the import, query the affected table using SELECT * FROM YourTable WHERE ColumnName = DEFAULT_VALUE; to confirm no unintended rows are defaulting.
  • If the issue persists, temporarily disable the default constraint using ALTER TABLE YourTable NOCHECK CONSTRAINT DF_YourTable_ColumnName;, re-import the data, and then re-enable it once the mapping issue is isolated and corrected.

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

Troubleshooting Guide: SQL Server Error 11015 – “The Column Was Skipped When Setting Data”

Why This Error Happens

This error typically occurs during Bulk Copy Program (BCP) operations, SSIS data flow tasks, or INSERT ... SELECT bulk operations when there is a mismatch between the source data fields and the destination table’s column schema. It commonly arises from a corrupted or outdated format file (.fmt) that no longer matches the current table structure, or from a mismatch in column ordinals between the source data file and the target table definition. Additionally, this can be triggered by permission restrictions on specific columns that prevent the SQL Server engine from binding the incoming data stream correctly.

Step-by-Step Resolution Guide

Step 1: Validate the Table Schema Against the Source Data

  • Open SQL Server Management Studio (SSMS) and run sp_help 'YourTableName' to view the exact column order, data types, and nullability.
  • Compare this output against your source file (CSV, .dat, or .fmt) to ensure the column count and order match exactly.
  • Look specifically for columns that may have been added or dropped in SQL Server 2025 since the format file was generated.

Step 2: Regenerate the BCP Format File

  • Navigate to your working directory in Command Prompt (Run as Administrator) on Windows Server 2025.
  • Execute the following command to generate a fresh XML format file: bcp YourDatabase.dbo.YourTable format nul -c -x -f C:\BCP\NewFormat.xml -T -S YourServerInstance
  • Replace the old, corrupted format file referenced in your import job with this newly generated NewFormat.xml.

Step 3: Check Column-Level Permissions

  • Verify that the service account or login executing the data import has INSERT and UPDATE permissions on every column within the target table.
  • Run the following query to check specific column grants: SELECT * FROM sys.column_permissions WHERE grantee_principal_id = USER_ID('YourServiceAccount')
  • If specific columns are restricted, grant access using: GRANT INSERT ON YourTable (ColumnName) TO YourServiceAccount;

Step 4: Clear SSIS Buffer Cache and Rebuild the Package

  • If the error originates from an SSIS package rather than raw BCP, open the package in SQL Server Data Tools (SSDT).
  • Right-click the Data Flow Task and select “Refresh” to force the metadata to resync with the destination table’s current schema.
  • Save and redeploy the package to the SSIS Catalog to ensure the buffer metadata is no longer stale.

Alternative or Verification Steps

  • To verify the fix, run the import task again with the -e error.log flag in your BCP command; the error log should return zero skipped column entries upon completion.
  • If the issue persists, bypass the format file entirely by using the “Native” import mode (-n flag) instead of character mode (-c), as this often resolves binary mismatch issues specific to Windows Server 2025 encoding updates.

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

Troubleshooting Guide: SQL Server Error 11013 — “The Column Had a Bad Status”

Why This Error Happens

Error 11013 typically occurs during BCP operations, BULK INSERT, or OLE DB provider data retrieval when SQL Server encounters a column whose data cannot be properly read or converted due to type mismatches, truncation, or NULL handling issues. This often stems from a corrupted format file, mismatched schema definitions between source and destination, or an underlying provider (like the OLE DB Driver) failing to return valid metadata for a specific column. In some cases, this is also triggered by insufficient buffer sizes allocated for large object (LOB) data types such as VARCHAR(MAX) or NVARCHAR(MAX).

Step-by-Step Resolution Guide

Step 1: Validate the Format File and Column Mapping

  • Open the .fmt file used in your BCP or BULK INSERT command and confirm the column count matches the destination table exactly.
  • Check for mismatched data types, especially between SQL_VARIANT, XML, or MAX types and their format file equivalents.
  • Run: bcp YourDatabase.dbo.YourTable format nul -c -f YourTable.fmt -T -S YourServerInstance to regenerate a clean format file.

Step 2: Update or Reinstall the OLE DB Driver

  • Navigate to Control Panel > Programs > Programs and Features on Windows Server 2025 / Windows 11 and check the version of “Microsoft OLE DB Driver for SQL Server.”
  • Download and install the latest driver from the Microsoft Download Center if the version is outdated (pre-19.x branches are common culprits).
  • Restart the SQL Server service via services.msc after installation to ensure the provider registry is refreshed.

Step 3: Increase Buffer and Timeout Settings for LOB Columns

  • Open SQL Server Management Studio (SSMS) and connect to the affected instance.
  • Run the following to check for oversized or malformed LOB data: SELECT column_name, DATA_LENGTH FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'YourTable';
  • If using a linked server or OLE DB provider, increase the OLE DB Timeout and Query Timeout values under Server Properties > Connections in SSMS.

Step 4: Rebuild Corrupted Statistics or Indexes on the Table

  • Run DBCC CHECKTABLE('YourTable') WITH ALL_ERRORMSGS; to detect underlying corruption affecting column metadata.
  • If corruption is found, execute ALTER INDEX ALL ON YourTable REBUILD; to restore column status integrity.

Alternative or Verification Steps

  • Re-run the original BCP, BULK INSERT, or data retrieval query that triggered the error — it should now complete without raising Error 11013.
  • As an alternative, export the problematic table to a flat file using the SQL Server Import and Export Wizard (reachable via Start > SQL Server 2025 > Import and Export Data) to isolate whether the issue is provider-specific or data-specific.

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

Troubleshooting Guide: SQL Server Error 11011 — Data Integrity Constraint Violation

Why This Error Happens

Error 11011 occurs when SQL Server 2025 attempts to write or update a data value that conflicts with a defined integrity constraint, such as a CHECK constraint, FOREIGN KEY relationship, column data type boundary, or a corrupted constraint metadata entry. This often happens after a schema migration, an in-place upgrade to SQL Server 2025, or when applications insert data that was valid under a looser constraint definition but violates a newly enforced rule. In rarer cases, the error stems from corrupted system catalog pages or inconsistent statistics following improper database detachment on Windows Server 2025.

Step-by-Step Resolution Guide

Step 1: Identify the Offending Constraint and Column

  • Open SQL Server Management Studio (SSMS) and run DBCC CHECKCONSTRAINTS('YourTableName') to list violated constraints.
  • Review the error log at C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Log\ERRORLOG for the exact column and constraint name referenced in Error 11011.
  • Note the data type, length, and constraint definition (CHECK, FOREIGN KEY, NOT NULL) tied to the column.

Step 2: Validate and Correct the Offending Data

  • Query the table using the constraint logic to isolate bad rows, e.g.:
    SELECT * FROM YourTable WHERE NOT (YourColumn CHECK_CONDITION)
  • Correct or remove rows that violate the constraint using UPDATE or DELETE statements with proper transaction wrapping (BEGIN TRAN / COMMIT).
  • If the violation stems from an application insert, validate the input layer (API, ETL job, or stored procedure) to ensure it respects the schema rules before resubmitting.

Step 3: Rebuild or Reapply the Constraint

  • If the constraint itself is corrupted or outdated, drop and recreate it:
    ALTER TABLE YourTable DROP CONSTRAINT YourConstraintName;
    ALTER TABLE YourTable WITH CHECK ADD CONSTRAINT YourConstraintName CHECK (YourCondition);
  • Ensure the WITH CHECK option is used so SQL Server revalidates all existing rows against the new constraint.
  • Restart the SQL Server service via Services.msc or net stop MSSQLSERVER && net start MSSQLSERVER on Windows Server 2025 to clear any cached execution plans referencing the old constraint.

Step 4: Check for System Catalog Corruption (If Issue Persists)

  • Run DBCC CHECKDB('YourDatabaseName') WITH NO_INFOMSGS, ALL_ERRORMSGS to scan for corruption.
  • If corruption is found, restore from the most recent verified backup rather than using REPAIR_ALLOW_DATA_LOSS, which can cause further data integrity issues.

Alternative or Verification Steps

  • Re-run the original INSERT/UPDATE operation that triggered Error 11011 and confirm it completes without exception.
  • As a verification pass, execute DBCC CHECKCONSTRAINTS again across the entire database (omit the table parameter) to confirm no other constraints are silently violated.

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

Why This Error Happens

Error 11012 occurs when SQL Server’s XML or structured data parser encounters a value that does not conform to the defined schema collection (XSD) for a column, typically due to a type mismatch, an out-of-range value, or an unexpected element/attribute in the incoming data. This is common after a schema collection update that wasn’t synchronized with application-side data contracts, or when data is migrated from a source system with looser validation rules. Corrupted schema metadata in the system catalog (sys.xmlschemacollections) can also trigger this error even when the data itself appears valid.

Step-by-Step Resolution Guide

Step 1: Identify the Offending Column and Schema Collection

  • Run the failing query/transaction in SQL Server Management Studio (SSMS) to capture the exact table and column referenced in the error message.
  • Query SELECT * FROM sys.xml_schema_collections WHERE name = 'YourSchemaName'; to confirm the schema collection tied to that column.
  • Extract the current XSD definition using SELECT xml_schema_namespace('dbo','YourSchemaName'); for manual review.

Step 2: Validate the Data Against the Schema Manually

  • Export the problematic XML/data value to a .xml file using a SELECT statement with FOR XML or by copying from SSMS results.
  • Use an external XSD validator (or PowerShell’s [System.Xml.Schema.XmlSchemaSet] class on Windows Server 2025) to test the exported file against the schema.
  • Look specifically for mismatched data types (e.g., xs:int vs. a string value), missing required elements, or values exceeding maxLength/maxInclusive constraints.

Step 3: Correct the Data or Update the Schema Collection

  • If the data is wrong, correct it at the source application before re-inserting, ensuring any serialization libraries (e.g., .NET XmlSerializer) match the SQL Server schema version.
  • If the schema itself is outdated, alter it using:
    ALTER XML SCHEMA COLLECTION dbo.YourSchemaName ADD '<xsd:schema>...</xsd:schema>';
  • Restart the SQL Server 2025 service via services.msc or Restart-Service MSSQLSERVER in PowerShell (run as Administrator) to clear any cached schema metadata.

Step 4: Check for Catalog Corruption

  • Run DBCC CHECKDB('YourDatabaseName') WITH NO_INFOMSGS, ALL_ERRORS; to rule out metadata corruption affecting the schema collection.
  • If corruption is found, restore the affected table/schema from the most recent known-good backup rather than attempting manual repair.

Alternative or Verification Steps

  • Re-run the original INSERT/UPDATE statement that triggered Error 11012; if it completes without exception, the schema/data mismatch is resolved.
  • As a fallback, temporarily relax the column to a plain XML type (without the CONTENT/DOCUMENT schema binding) to confirm the issue is schema-specific, then re-bind the schema once the data source is corrected.

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

Troubleshooting Guide: SQL Server Error 11010 – “User Does Not Have Permission to Write to the Column”

Why This Error Happens

This error occurs when a SQL Server login or user account lacks explicit UPDATE or INSERT permissions on a specific column within a table, even if they have broader table-level access. It is commonly triggered by column-level security configurations, restrictive schema permissions, or conflicts between role-based access control (RBAC) policies applied in SQL Server 2025. This can also surface after a database migration where granular column permissions were not properly transferred or re-applied.

Step-by-Step Resolution Guide

Step 1: Identify the Affected User and Column

  • Open SQL Server Management Studio (SSMS) and connect to the instance reporting the error.
  • Run the following query to pinpoint the exact column and user triggering the conflict:
  SELECT * FROM sys.fn_my_permissions('dbo.YourTableName', 'OBJECT');
  • Note the specific column name mentioned in the Error 11010 message from the Windows Event Viewer or SQL Server Logs.

Step 2: Grant Explicit Column-Level Permissions

  • Use the GRANT statement to provide specific write access to the identified column rather than the whole table.
  • Execute the following syntax in a New Query window:
  GRANT UPDATE ON dbo.YourTableName (YourColumnName) TO [DOMAIN\Username];
  • If using Windows 11 for local development, ensure you are running SSMS as an Administrator to apply these changes successfully.

Step 3: Verify Schema Ownership and Role Membership

  • Navigate to Object Explorer > Databases > Security > Users in SSMS.
  • Confirm the user is mapped to the correct schema (usually dbo) and is not restricted by a Deny permission set at a higher level (server or database role).
  • Check for conflicting DENY statements by running:
  SELECT * FROM sys.database_permissions WHERE state_desc = 'DENY';

Step 4: Restart the SQL Server Service

  • Open the Services app on Windows Server 2025 (services.msc).
  • Locate SQL Server (MSSQLSERVER) or your specific instance name.
  • Right-click and select Restart to ensure the new permission schema is loaded into the active session cache.

Alternative or Verification Steps

  • Verification: Have the affected user attempt the write operation again via the application or run a manual UPDATE query against the specific column to confirm the 11010 error no longer appears.
  • Alternative Fix: If granular permissions continue to fail, create a dedicated Database Role with the specific column permissions pre-configured, and add the user to that role instead of assigning permissions individually.

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

Troubleshooting Guide: SQL Server Error 11008 – “The provider cannot allocate memory or open another storage object on this column”

Why This Error Happens

This error typically occurs when SQL Server’s OLE DB provider exhausts available memory while attempting to store large object (LOB) data, such as text, image, varchar(max), or XML columns, during a bulk insert, replication, or linked server query. It can also be triggered when the server has insufficient virtual memory, restrictive “Max Server Memory” configurations, or when too many large object handles are opened simultaneously without being released. In some cases, corrupted temporary storage objects or outdated OLE DB provider drivers on Windows Server 2025 / Windows 11 contribute to this failure.

Step-by-Step Resolution Guide

Step 1: Increase SQL Server Memory Allocation

  • Open SQL Server Management Studio (SSMS) and connect to the instance.
  • Right-click the server instance, select Properties, then navigate to the Memory tab.
  • Increase the Maximum server memory (MB) value to allow more headroom for large object processing.
  • Run the following T-SQL to verify current settings:
EXEC sp_configure 'show advanced options', 1;
RECONFIGURE;
EXEC sp_configure 'max server memory';

Step 2: Check and Expand Virtual Memory / Page File

  • On Windows Server 2025 / Windows 11, go to Control Panel > System > Advanced system settings.
  • Under Performance Settings, click the Advanced tab and select Change under Virtual Memory.
  • Set a custom page file size (e.g., 1.5x to 2x physical RAM) on a drive with sufficient free space, such as C:\pagefile.sys.
  • Restart the server for changes to take effect.

Step 3: Update or Reinstall the OLE DB Provider

  • Verify the provider version being used (e.g., MSOLEDBSQL) by checking Control Panel > Programs and Features.
  • Download and install the latest Microsoft OLE DB Driver for SQL Server from the official Microsoft website.
  • Reconfigure the linked server or import/export task to use the updated provider.

Step 4: Reduce Batch Size for Bulk Operations

  • If the error occurs during a bulk insert or SSIS package, reduce the BatchSize and MaxInsertCommitSize properties.
  • For BULK INSERT T-SQL commands, add a smaller batch size parameter:
BULK INSERT YourTable
FROM 'C:\Data\file.csv'
WITH (BATCHSIZE = 5000);

Step 5: Clear Temporary Storage and Restart SQL Server Service

  • Open Services.msc and restart the SQL Server (MSSQLSERVER) service to release locked memory objects.
  • Clear the C:\Windows\Temp and SQL Server’s temporary LOB storage cache if accessible.
  • Confirm tempdb has adequate free space by running:
EXEC sp_spaceused;

Alternative or Verification Steps

  • Re-run the failed query, bulk insert, or SSIS package and monitor SQL Server logs (ERRORLOG) to confirm Error 11008 no longer appears.
  • If the issue persists, consider migrating large object columns to FILESTREAM storage to reduce in-memory processing overhead for LOB data.

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

Troubleshooting Guide: SQL Server Error 11009 — “The Provider Cannot Determine the Value for This Column”

Why This Error Happens

This error typically occurs when SQL Server’s OLE DB provider attempts to retrieve a column value from a linked server or external data source but encounters a schema mismatch, a NULL-handling conflict, or a provider-level metadata inconsistency. It is commonly triggered by outdated OLE DB drivers, misconfigured linked server settings, or corrupted distributed query metadata cache entries. In Windows Server 2025 environments, this is frequently exacerbated by stricter default security contexts that limit how providers negotiate column-level data types during distributed queries.

Step-by-Step Resolution Guide

Step 1: Verify and Update the OLE DB Provider

  • Open SQL Server Management Studio (SSMS) and navigate to Server Objects > Linked Servers > Providers.
  • Confirm the provider (e.g., MSOLEDBSQL, MSDASQL) is updated to the latest version compatible with SQL Server 2025.
  • Download the latest Microsoft OLE DB Driver from the official Microsoft Download Center and reinstall it on the host server.

Step 2: Check Linked Server Configuration and Permissions

  • Run the following command to inspect current linked server settings:
  EXEC sp_linkedservers;
  • Right-click the linked server in SSMS, go to Properties > Server Options, and ensure “Enable Promotion of Distributed Transactions” and “RPC Out” are correctly set based on your query type.
  • Validate that the service account running SQL Server has db_datareader permissions on the source and destination databases.

Step 3: Clear Distributed Query Metadata Cache

  • Execute the following to flush cached schema information for the provider:
  DBCC FREEPROCCACHE;
  DBCC FREESYSTEMCACHE('ALL');
  • Restart the SQL Server service via Services.msc or services.msc on Windows Server 2025 to ensure the cache fully resets.

Step 4: Explicitly Cast or Convert the Problematic Column

  • Modify the query to explicitly cast the column causing the error, for example:
  SELECT CAST(ColumnName AS NVARCHAR(255)) FROM OPENQUERY(LinkedServerName, 'SELECT ColumnName FROM RemoteTable');
  • This bypasses ambiguous type inference issues between the provider and SQL Server’s query engine.

Step 5: Review Windows Server 2025 Security Policies

  • Open Local Security Policy (secpol.msc) and check under Local Policies > Security Options for any newly enforced authentication restrictions affecting OLE DB providers.
  • Ensure “Network access: Let Everyone permissions apply to anonymous users” is not blocking legacy provider authentication if using older linked server configurations.

Alternative or Verification Steps

  • Run a test query directly against the linked server using OPENQUERY to confirm the column now returns a valid, non-ambiguous value instead of throwing Error 11009.
  • If the issue persists, recreate the linked server from scratch using spdropserver followed by spaddlinkedserver, specifying explicit provider strings and data type definitions to eliminate residual configuration corruption.

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

Troubleshooting Guide: SQL Server Error 11006 – Sign Mismatch Data Conversion

Why This Error Happens

Error 11006 occurs when SQL Server 2025 attempts to implicitly or explicitly convert a value between a signed and unsigned numeric data type (such as tinyint to smallint, or a negative value being forced into an unsigned column) and the conversion rules detect incompatible sign boundaries. This is typically triggered by linked server queries, CLR integration data type mapping, or poorly defined schema casts where a negative value cannot be represented in the target column’s unsigned range. It can also surface after an in-place upgrade to SQL Server 2025 if legacy stored procedures rely on deprecated implicit conversion behaviors that are now more strictly enforced.

Step-by-Step Resolution Guide

Step 1: Identify the Offending Query or Procedure

  • Check the SQL Server Error Log at C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Log\ERRORLOG for the exact statement or batch ID tied to Error 11006.
  • Run SELECT * FROM sys.dm_exec_query_stats cross-referenced with sys.dm_exec_sql_text to pinpoint the exact T-SQL causing the cast failure.
  • Look specifically for CAST or CONVERT operations involving tinyint, smallint, int, or bigint mismatches.

Step 2: Correct the Data Type Definitions

  • Open SQL Server Management Studio (SSMS) 21 and navigate to the affected table via Object Explorer > Databases > [YourDB] > Tables.
  • Right-click the column in question and select Design, then explicitly change the data type to match the signed/unsigned expectation of the source system (e.g., change tinyint to smallint if negative values are expected).
  • Update any corresponding stored procedures or views using ALTER PROCEDURE to explicitly cast values using TRY_CONVERT instead of relying on implicit conversion.

Step 3: Patch and Validate SQL Server Configuration

  • Confirm SQL Server 2025 is running the latest Cumulative Update via SQL Server Configuration Manager or by running SELECT @@VERSION;.
  • If using Linked Servers, open Server Objects > Linked Servers > [ServerName] > Properties in SSMS and verify the Server Options for “Enable Promotion of Distributed Transactions” and data type mapping settings are consistent with the remote provider.
  • Restart the SQL Server service via services.msc or Restart-Service MSSQLSERVER in PowerShell (run as Administrator) to apply configuration changes.

Step 4: Rebuild Execution Plans

  • Clear the plan cache to remove any cached execution plans that may be enforcing stale type conversion metadata by running DBCC FREEPROCCACHE;.
  • Re-run the original query to confirm the cached plan is no longer forcing the invalid sign conversion.

Alternative or Verification Steps

  • Re-execute the originally failing query or application transaction and confirm no 11006 error appears in the Windows Event Viewer under Applications and Services Logs > MSSQLSERVER.
  • If the error persists, isolate the issue by wrapping the suspect column in TRY_CAST(column AS BIGINT) within a test query; a NULL result (instead of a hard failure) confirms the sign mismatch has been successfully bypassed and the schema/column fix below needs to be finalized.

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

Troubleshooting Guide: Error 11007 – Data Value Overflow in SQL Server 2025

Why This Error Happens

This error occurs when SQL Server attempts to convert or retrieve data through an OLE DB provider, but the source value exceeds the maximum range or precision supported by the destination data type. This commonly happens with linked server queries, Integration Services (SSIS) data flows, or distributed queries where numeric, decimal, or datetime values from a heterogeneous source (such as Excel, Oracle, or a flat file) do not map cleanly to the corresponding SQL Server data type. It can also stem from mismatched column metadata between the source provider and the destination table schema, especially after a provider update in Windows Server 2025 environments.

Step-by-Step Resolution Guide

Step 1: Identify the Offending Column or Value

  • Run the failing query or SSIS package in isolation to capture the exact statement triggering Error 11007.
  • Use SELECT * FROM OPENQUERY(LinkedServerName, 'SELECT * FROM SourceTable') to inspect raw source values.
  • Check for extremely large numbers, negative values in unsigned fields, or dates outside the 1753-01-01 to 9999-12-31 range supported by SQL Server’s datetime type.

Step 2: Correct the Data Type Mapping

  • Open SQL Server Management Studio (SSMS) and compare the source column type against the destination table schema using sp_help 'TableName'.
  • Widen the destination column where appropriate, for example changing INT to BIGINT or DECIMAL(10,2) to DECIMAL(18,4).
  • If using SSIS, open the package in Visual Studio/SSDT and adjust the Data Conversion transformation to match the source precision and scale exactly.

Step 3: Update Linked Server and Provider Settings

  • Navigate to SSMS > Server Objects > Linked Servers > Providers, right-click the relevant OLE DB provider (e.g., MSOLEDBSQL, Microsoft.ACE.OLEDB.16.0).
  • Enable “Allow InProcess” and verify “Level zero only” is unchecked if large value handling is required.
  • Run the following to confirm provider options are correctly set:
EXEC sp_serveroption 'LinkedServerName', 'collation compatible', 'false';

Step 4: Apply Explicit Casting in the Query

  • Modify the query to explicitly cast or convert problematic columns before retrieval, such as CAST(SourceColumn AS DECIMAL(18,4)).
  • This prevents SQL Server from relying on default implicit conversions that may not match the provider’s native overflow tolerance.

Alternative or Verification Steps

  • Re-run the original query or SSIS package after applying the schema and casting changes; confirm it completes without Error 11007 and that no values were silently truncated by checking row counts against the source.
  • If the error persists, isolate the issue by exporting the source data to a staging table with intentionally oversized data types (e.g., NVARCHAR(MAX), DECIMAL(38,10)), then incrementally narrow the types until you identify the exact overflow threshold.

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

Why This Error Happens

Error 11005 in SQL Server 2025 typically surfaces in the SQL Server Error Log during the SSPI/Kerberos pre-login handshake, when the security token or network packet returned by the Windows Server 2025 authentication provider exceeds the buffer size SQL Server initially allocated for the connection. This is most often triggered by oversized Kerberos tickets (common in environments with many Active Directory group memberships) or by a mismatched Network Packet Size setting between the client driver and the SQL Server instance. While SQL Server resizes the buffer and completes the operation, the truncation event is logged because the first attempt failed before the retry succeeded.

Step-by-Step Resolution Guide

Step 1: Increase the SQL Server Network Packet Size

  • Open SQL Server Management Studio (SSMS) and connect to the instance.
  • Run: EXEC sp_configure 'network packet size', 8192; RECONFIGURE;
  • Restart the SQL Server service via services.msc or Restart-Service MSSQLSERVER in PowerShell.

Step 2: Reduce Kerberos Token Size (SSPI Buffer Fix)

  • On the Domain Controller, open Group Policy Management and navigate to Computer Configuration > Policies > Windows Settings > Security Settings > Local Policies > Security Options.
  • Enable “Network security: Configure encryption types allowed for Kerberos” and restrict to AES128/AES256 only, removing legacy RC4 types that bloat tickets.
  • Alternatively, set the registry value MaxTokenSize (DWORD, decimal 65535) under HKLM\SYSTEM\CurrentControlSet\Control\Lsa\Kerberos\Parameters on both the SQL Server host and client machines.

Step 3: Update the SQL Server Client Driver / ODBC Connection String

  • Ensure clients are using the latest Microsoft ODBC Driver 19 (or later) for SQL Server 2025 compatibility.
  • In the connection string, explicitly set Packet Size=8192; to match the server-side configuration from Step 1.
  • Reboot the application server or IIS app pool to flush cached connection pools using the old packet size.

Step 4: Validate SQL Server Error Log and SNI Configuration

  • Open the SQL Server Configuration Manager and check SQL Server Network Configuration > Protocols to confirm TCP/IP settings aren’t forcing a smaller MTU.
  • Review ERRORLOG (default path: C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Log\) for repeated 11005 entries correlating with specific client IPs.

Alternative or Verification Steps

  • Re-run the previously failing query or connection attempt and confirm Error 11005 no longer appears in the ERRORLOG or Windows Event Viewer under Application Logs.
  • If the error persists, capture a network trace with Wireshark or Microsoft Message Analyzer during the handshake to confirm the Kerberos token size exceeds the TCP MTU, then work with your AD team to prune unnecessary group memberships from the service account.

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

Troubleshooting Guide: SQL Server Error 11003

Why This Error Happens

Error 11003 typically occurs when SQL Server attempts to convert data between incompatible types during a linked server query, bulk insert, or distributed transaction, and the source data contains a value that does not conform to the expected format of the destination column. This is often triggered by malformed data in heterogeneous data sources (such as Excel, OLE DB providers, or flat files), locale/collation mismatches, or corrupted intermediate cache files used during the conversion process. Unlike simple overflow or sign errors, this specific code indicates an ambiguous or unsupported conversion path between the provider and SQL Server’s native data types.

Step-by-Step Resolution Guide

Step 1: Identify the Offending Data Source and Query

  • Isolate the specific linked server, OPENROWSET, or BULK INSERT statement triggering the error.
  • Run the query with a smaller subset of data (e.g., TOP 10) to narrow down which row/column is causing the conversion failure.
  • Check Windows Event Viewer under Applications and Services Logs > Microsoft > SQL Server for the full stack trace tied to Error 11003.

Step 2: Verify and Correct Data Type Mappings

  • Open SQL Server Management Studio (SSMS) and inspect the schema of both source and destination tables.
  • Ensure columns using FLOAT, DECIMAL, or DATETIME2 are not being implicitly cast to incompatible types like VARCHAR or BIT.
  • Explicitly cast problematic columns in your query, for example: CAST(SourceColumn AS NVARCHAR(50)).

Step 3: Update the OLE DB Provider or Driver

  • Navigate to Control Panel > Administrative Tools > ODBC Data Sources (64-bit) on Windows Server 2025/Windows 11.
  • Check the version of the provider (e.g., MSOLEDBSQL or Microsoft.ACE.OLEDB.16.0) linked to the external data source.
  • Download and install the latest provider version from the official Microsoft Download Center to ensure compatibility with SQL Server 2025’s updated type-conversion engine.

Step 4: Clear Corrupted Metadata Cache

  • Open a new query window in SSMS and execute the following command to clear potentially corrupted plan cache that might be storing a faulty conversion plan:
  • DBCC FREEPROCCACHE;
  • Restart the SQL Server service via services.msc to ensure the linked server metadata is refreshed from a clean state.

Alternative or Verification Steps

  • Verification: Re-run the original query or ETL job; if successful, check the destination table to confirm the row counts match the source exactly (no silent truncation occurred).
  • Alternative: If the error persists on a specific linked server, bypass the native conversion by staging the data into a temporary VARCHAR table first, then perform the type conversion manually within a T-SQL script using TRY_CAST to isolate NULL-able errors.

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

Troubleshooting Guide: SQL Server Error 11004

Why This Error Happens

Error 11004 in SQL Server 2025 typically occurs when a DNS name resolution failure happens at the network layer, often due to the getaddrinfo function being unable to resolve a hostname to an IP address. This can stem from stale DNS cache entries, misconfigured DNS suffixes in Windows Server 2025 network settings, or a Linked Server / Availability Group listener pointing to a hostname that no longer resolves correctly. In some cases, this error is also triggered when SQL Server’s underlying network provider returns a NULL value unexpectedly during a connection handshake, which the engine logs as “successfully returned a NULL value” despite the operation technically failing upstream.

Step-by-Step Resolution Guide

Step 1: Flush and Validate DNS Resolution

  • Open an elevated Command Prompt on the Windows Server 2025 / Windows 11 host.
  • Run ipconfig /flushdns to clear stale DNS cache entries.
  • Run nslookup <your-sql-server-hostname> to confirm the hostname resolves to the correct IP address.
  • If resolution fails, update the DNS server entries under Network Adapter Settings > IPv4 Properties > Use the following DNS server addresses.

Step 2: Verify SQL Server Network Configuration

  • Open SQL Server Configuration Manager.
  • Navigate to SQL Server Network Configuration > Protocols for MSSQLSERVER.
  • Ensure TCP/IP is enabled and that the IP addresses listed (especially IPAll) have a valid, non-blank TCP Port (default 1433).
  • Restart the SQL Server service after making changes: net stop MSSQLSERVER && net start MSSQLSERVER.

Step 3: Check Linked Server or Listener Configuration

  • If the error originates from a Linked Server, run the following in SQL Server Management Studio (SSMS):
  EXEC sp_helpserver;
  • Confirm the data source name matches a resolvable hostname or IP address.
  • For Always On Availability Group listeners, verify the listener’s DNS record in DNS Manager points to the correct cluster IP resource.

Step 4: Review Windows Firewall and Hosts File

  • Open C:\Windows\System32\drivers\etc\hosts with a text editor (as Administrator) and check for conflicting or outdated static entries for the SQL Server hostname.
  • Confirm Windows Defender Firewall allows inbound/outbound traffic on port 1433 under Windows Defender Firewall with Advanced Security > Inbound Rules.

Alternative or Verification Steps

  • To verify the fix, attempt a fresh connection in SSMS using both the hostname and the raw IP address; if the IP connects but the hostname fails, the issue is confirmed to be DNS-related.
  • As an alternative, bypass DNS entirely by hardcoding the correct IP-to-hostname mapping in the hosts file as a temporary workaround while DNS infrastructure issues are resolved.

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

Why This Error Happens

Error 11001 in SQL Server 2025 is inherited directly from the underlying Windows Sockets (Winsock) layer, where it maps to WSAHOST_NOT_FOUND. This typically occurs when the SQL Server Network Interface (SNI) or ODBC driver cannot resolve the hostname or instance alias to an IP address, often due to a broken DNS entry, a stale hosts file, or a misconfigured SQL Server Browser service. The accompanying “Non-NULL value successfully returned” message is a diagnostic artifact logged by the client driver confirming that a response buffer was returned by the resolver — but that buffer contained an invalid or empty host record rather than a valid IP, which is why the connection still fails despite the “successful” return code.

Step-by-Step Resolution Guide

Step 1: Verify DNS Resolution for the SQL Server Host

  • Open Command Prompt as Administrator and run nslookup <YourSQLServerName> to confirm the hostname resolves to a valid IP.
  • If resolution fails, check C:\Windows\System32\drivers\etc\hosts for stale or conflicting entries and remove them.
  • Flush the local DNS cache using ipconfig /flushdns.

Step 2: Confirm SQL Server Browser and Network Configuration

  • Open SQL Server Configuration Manager and ensure the SQL Server Browser service is running (required for named instance resolution).
  • Under SQL Server Network Configuration > Protocols for [Instance], verify TCP/IP is enabled and the correct static port (default 1433) is assigned.
  • Restart the SQL Server service after any protocol changes.

Step 3: Check Firewall and Port Accessibility

  • On Windows Server 2025 / Windows 11, open Windows Defender Firewall with Advanced Security.
  • Confirm inbound rules exist for TCP 1433 (database engine) and UDP 1434 (SQL Browser).
  • Test connectivity using Test-NetConnection -ComputerName <ServerName> -Port 1433 in PowerShell.

Step 4: Rebuild the Client Alias or Connection String

  • Open ODBC Data Source Administrator (odbcad32.exe) and recreate the connection using the server’s fully qualified domain name (FQDN) instead of a NetBIOS alias.
  • Avoid cached or hardcoded IP references that may no longer match DNS records.

Alternative or Verification Steps

  • Re-run the failing query or connection attempt and confirm the client receives a valid non-null IP/result instead of the diagnostic placeholder message.
  • If the issue persists, bypass DNS entirely by connecting using the server’s static IP address in the connection string to confirm whether the root cause is name resolution or a deeper network/firewall block.

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

Troubleshooting Guide: SQL Server Error 11002 — “Deferred Accessor Validation Occurred. Invalid Binding for This Column.”

Why This Error Happens

This error typically occurs when a prepared statement or parameterized query’s execution plan becomes stale relative to the actual schema of the underlying table, causing a mismatch between the cached column metadata and the current column definition. It is frequently triggered after a schema change (such as an ALTER TABLE, column type change, or index rebuild) occurs while a client-side cursor or OLE DB/ODBC accessor still references the old binding. Corrupted query plan cache entries or an outdated SQL Server Native Client driver on Windows Server 2025 / Windows 11 can also cause the deferred accessor to fail validation.

Step-by-Step Resolution Guide

Step 1: Clear the Procedure and Plan Cache

  • Open SQL Server Management Studio (SSMS) and connect to the affected instance.
  • Run DBCC FREEPROCCACHE; to purge stale execution plans.
  • If the issue is isolated to one database, use DBCC FLUSHPROCINDB (<database_id>); instead to avoid a full server-wide cache flush.

Step 2: Update SQL Server Native Client / ODBC Driver

  • Navigate to Control Panel > Programs and Features on Windows Server 2025 / Windows 11 and check the installed version of “Microsoft OLE DB Driver for SQL Server” or “ODBC Driver for SQL Server.”
  • Download and install the latest driver from the Microsoft Download Center to ensure compatibility with SQL Server 2025 binding behavior.
  • Restart the application or service referencing the driver after installation.

Step 3: Recompile Affected Stored Procedures and Views

  • Identify procedures/views tied to the column throwing the error using:
    SELECT OBJECT_NAME(object_id) FROM sys.sql_modules WHERE definition LIKE '%YourColumnName%';
  • Force recompilation with EXEC sp_recompile 'YourSchema.YourObjectName';
  • If the column was altered, drop and recreate any dependent indexed views to refresh their bindings.

Step 4: Validate Schema Consistency

  • Run DBCC CHECKDB ('YourDatabaseName') WITH NO_INFOMSGS, ALL_ERRORMSGS; to rule out underlying corruption.
  • Check the sys.columns catalog view against the application’s expected schema definition to confirm no mismatched data types or nullability settings exist.
  • Restart the SQL Server service via Services.msc (SQL Server (MSSQLSERVER)) if catalog views still report inconsistent metadata after corrections.

Alternative or Verification Steps

  • Re-run the original query or application transaction that triggered Error 11002 — if it completes without the “Invalid binding” message, the accessor cache has been successfully refreshed.
  • As an alternative, if the error persists, uninstall and reinstall the client application’s data access layer (e.g., ADO.NET provider or OLE DB provider) to rule out a corrupted local driver installation rather than a server-side issue.

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

Troubleshooting Guide: SQL Server Error 11000 – “Unknown Status Code for This Column”

Why This Error Happens

This error typically occurs when SQL Server 2025 encounters a column metadata mismatch between the data provider and the client application, often due to an outdated OLE DB driver or ODBC connector that doesn’t recognize newer column status flags introduced in SQL Server 2025. It can also stem from corrupted statistics or schema metadata in system catalog views, particularly after an in-place upgrade from an older SQL Server version. Additionally, this issue frequently surfaces when third-party tools or custom applications query extended column properties (like those used in JSON or vector data types) without the necessary compatibility level set.

Step-by-Step Resolution Guide

Step 1: Update the Client Connectivity Drivers

  • Navigate to the Microsoft Download Center and ensure you have the latest Microsoft OLE DB Driver 20 for SQL Server installed.
  • Uninstall legacy drivers via Control Panel > Programs and Features on Windows 11/Server 2025 to avoid version conflicts.
  • Restart the client application or service after driver installation.

Step 2: Verify Database Compatibility Level

  • Open SQL Server Management Studio (SSMS) and connect to the instance.
  • Run the following query to check the current level:
  SELECT compatibility_level FROM sys.databases WHERE name = 'YourDatabaseName';
  • If the level is below 170 (SQL Server 2025), update it using:
  ALTER DATABASE YourDatabaseName SET COMPATIBILITY_LEVEL = 170;

Step 3: Rebuild Corrupted Statistics and Indexes

  • Execute DBCC CHECKDB('YourDatabaseName') WITH NO_INFOMSGS, ALL_ERRORMSGS; to check for underlying corruption.
  • If errors are found, run DBCC UPDATEUSAGE followed by an index rebuild on the affected table: ALTER INDEX ALL ON [TableName] REBUILD;.
  • Clear the query plan cache using DBCC FREEPROCCACHE; to remove any stale execution plans referencing the old column schema.

Step 4: Check Column Data Type Definitions

  • Inspect the specific table causing the error for new data types (e.g., VECTOR or JSON native types specific to 2025).
  • Ensure the application’s data access layer (e.g., .NET SqlClient) is updated to a version (Microsoft.Data.SqlClient 6.x or higher) that supports these new type definitions.
  • Modify the connection string to include TrustServerCertificate=True; if using encrypted connections, as handshake failures can sometimes mask as status code errors.

Alternative or Verification Steps

  • Verification: Re-run the original query or report that triggered the error; check the SQL Server Error Log located at C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Log\ERRORLOG to confirm no new instances of Error 11000 have been logged.
  • Alternative: If the error persists, isolate the issue by querying the specific column using CAST or CONVERT to a standard data type (e.g., NVARCHAR(MAX)) to bypass the driver’s status code interpretation bug temporarily.

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

Troubleshooting Guide: Error 10989 – MAXTEMPDBDATA_PERCENT Not in Effect

Why This Error Happens

This error occurs when SQL Server 2025’s MAX_TEMPDB_DATA_PERCENT resource governance feature detects that tempdb does not meet the structural prerequisites required to enforce the percentage cap. Typically, this happens because tempdb has only a single data file, the data files are not uniformly sized, or they reside across inconsistent storage paths/filegroups. SQL Server requires multiple, equally-sized tempdb data files to calculate and apply a consistent percentage-based limit, and if this configuration is violated, the feature silently disengages and logs Event ID 10989.

Step-by-Step Resolution Guide

Step 1: Verify Current Tempdb File Configuration

  • Open SQL Server Management Studio (SSMS) or Azure Data Studio connected to your instance.
  • Run the following query to inspect tempdb files:
  SELECT name, size, physical_name, growth, is_percent_growth 
  FROM tempdb.sys.database_files;
  • Confirm whether multiple data files exist and whether their size and growth values match exactly.

Step 2: Equalize Tempdb Data File Sizes

  • If files are mismatched, run ALTER DATABASE commands to resize each file to an identical value (e.g., 1024MB each):
  ALTER DATABASE tempdb MODIFY FILE (NAME = tempdev, SIZE = 1024MB, FILEGROWTH = 256MB);
  ALTER DATABASE tempdb MODIFY FILE (NAME = temp2, SIZE = 1024MB, FILEGROWTH = 256MB);
  • Ensure FILEGROWTH values are also identical across all files to prevent future drift.
  • Restart the SQL Server service via services.msc or net stop MSSQLSERVER && net start MSSQLSERVER for sizing changes to fully apply on disk.

Step 3: Add Additional Tempdb Files If Only One Exists

  • If tempdb currently has only one data file, add additional files matching CPU core count (up to 8, per Microsoft best practice):
  ALTER DATABASE tempdb ADD FILE (NAME = temp2, FILENAME = 'E:\SQLData\tempdb2.ndf', SIZE = 1024MB, FILEGROWTH = 256MB);
  • Place files on the same fast storage volume (ideally NVMe/SSD) to avoid I/O bottlenecks.

Step 4: Re-enable MAXTEMPDBDATA_PERCENT

  • Once file configuration is standardized, re-apply the resource governor setting:
  ALTER RESOURCE GOVERNOR WITH (MAX_TEMPDB_DATA_PERCENT = 50);
  ALTER RESOURCE GOVERNOR RECONFIGURE;
  • Confirm no errors are thrown during reconfiguration.

Step 5: Review SQL Server Error Log for Confirmation

  • Open the SQL Server error log via SSMS (Management > SQL Server Logs) or check the physical log file in C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Log\ERRORLOG.
  • Confirm Event ID 10989 no longer appears after the next service restart or reconfiguration cycle.

Alternative or Verification Steps

  • Run SELECT * FROM sys.dm_resource_governor_resource_pools; and check the max_tempdb_data_percent column to confirm the value is now active and enforced.
  • If the error persists, drop and recreate all tempdb files from scratch with identical specifications using ALTER DATABASE tempdb REMOVE FILE followed by fresh ADD FILE statements, then restart the SQL Server service.

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

Troubleshooting Guide: Error 10990 – TempDB Workload Group Space Limit Exceeded

Why This Error Happens

This error occurs when the Resource Governor’s configured MAX_TEMPDB_SPACE_MB limit for a specific workload group is lower than the tempdb space currently being consumed by active sessions in that group. This typically happens immediately after an administrator lowers the tempdb limit via ALTER WORKLOAD GROUP while existing queries, temp tables, or version store entries are still holding onto space allocated under the previous, higher limit. It can also occur during heavy batch processing or poorly optimized queries that generate excessive spills to tempdb, causing consumption to spike past a newly configured ceiling.

Step-by-Step Resolution Guide

Step 1: Identify the Offending Workload Group and Current Consumption

  • Open SQL Server Management Studio (SSMS) and connect to the Database Engine.
  • Run the following query to check current tempdb usage against configured limits:
  SELECT group_name, max_tempdb_space_mb, tempdb_space_consumed_mb 
  FROM sys.dm_resource_governor_workload_groups;
  • Note the specific group referenced in Error 10990 to determine the scale of the overage.

Step 2: Increase the Configured TempDB Limit (Immediate Fix)

  • Navigate to the Resource Governor settings via SSMS or T-SQL.
  • Execute an ALTER WORKLOAD GROUP command to raise the ceiling to accommodate current workload demands:
  ALTER WORKLOAD GROUP [YourGroupName] 
  WITH (MAX_TEMPDB_SPACE_MB = 51200);
  • Apply the Resource Governor configuration changes by running:
  ALTER RESOURCE GOVERNOR RECONFIGURE;

Step 3: Identify and Kill Runaway Sessions (If Limit Cannot Be Raised)

  • If increasing the limit is not an option due to server-wide storage constraints, identify specific sessions consuming excessive tempdb space.
  • Query the sys.dm_db_task_space_usage view joined with sys.dm_exec_sessions to pinpoint the exact Session ID (SPID) causing the spike.
  • Use KILL [SPID] to terminate the specific query causing the tempdb bloat, allowing space to be reclaimed.

Step 4: Optimize Query Plans to Prevent Recurrence

  • Review the execution plans of recurring queries within that workload group for excessive tempdb spills (common in Sort or Hash Match operators).
  • Add appropriate non-clustered indexes to support ORDER BY or GROUP BY clauses to reduce the need for Sort/Hash spills.
  • Consider increasing the work_mem equivalent via query hints (e.g., OPTION (MAXDOP 1) for specific heavy parallel queries causing high tempdb pressure, if applicable to the workload).

Alternative or Verification Steps

  • Verify the Fix: Re-run the sys.dm_resource_governor_workload_groups query from Step 1. Confirm that tempdb_space_consumed_mb is now safely below the newly configured max_tempdb_space_mb value.
  • Alternative Solution: If the group constantly bumps against limits, consider creating a dedicated Resource Pool with a higher dynamic cap specifically for ETL or reporting workloads, separating them from OLTP transaction groups to prevent resource starvation.

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

Troubleshooting Guide: Error 10987 – Resource Governor Configuration Load Failure

Why This Error Happens

This error occurs when SQL Server’s internal scheduler is unable to queue an asynchronous task required to load the Resource Governor configuration from the replicated master database during startup. The root cause is typically a resource exhaustion issue—such as worker thread starvation, memory pressure, or a corrupted system configuration table (sys.resourcegovernorconfiguration)—that prevents the async task queue from accepting new requests. In clustered or Always On Availability Group environments, this can also stem from replication timing issues where the master database metadata has not fully synchronized before the Resource Governor attempts initialization.

Step-by-Step Resolution Guide

Step 1: Verify SQL Server Service Account Permissions and Memory State

  • Open Windows Event Viewer and navigate to Windows Logs > Application to check for correlating MSSQLSERVER memory pressure warnings (Event ID 701 or 802) around the same timestamp as Error 10987.
  • Confirm the SQL Server service account has sufficient “Lock Pages in Memory” and “Perform Volume Maintenance Tasks” rights via secpol.msc > Local Policies > User Rights Assignment.
  • Run DBCC MEMORYSTATUS in a query window (if the instance is reachable) to inspect current memory grants and worker thread availability.

Step 2: Disable and Reset Resource Governor Configuration

  • Connect via SQLCMD or the Dedicated Admin Connection (DAC) using sqlcmd -S servername -A since the standard engine may be unresponsive.
  • Execute the following to disable Resource Governor safely:
  ALTER RESOURCE GOVERNOR DISABLE;
  GO
  • Check for corruption in the configuration tables by running:
  DBCC CHECKCATALOG('master');
  GO
  • If corruption is found, restore the master database from the last known good backup located typically at C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Backup\.

Step 3: Increase Worker Thread and Task Queue Limits

  • Open SQL Server Management Studio (SSMS), right-click the instance, and navigate to Properties > Processors.
  • Increase the Max Worker Threads value (default is 0/auto-configure) if the server has high core density, as insufficient threads can block async task submission.
  • Alternatively, update via T-SQL:
  EXEC sp_configure 'max worker threads', 2048;
  RECONFIGURE WITH OVERRIDE;
  • Restart the SQL Server service via services.msc or net stop MSSQLSERVER && net start MSSQLSERVER.

Step 4: Re-enable and Reconfigure Resource Governor

  • Once the service is stable, re-enable the governor:
  ALTER RESOURCE GOVERNOR RECONFIGURE;
  GO
  • Verify replication status if using Always On by checking the Always On High Availability dashboard in SSMS to ensure the master database sync state is marked “Synchronized” before the engine fully initializes.

Alternative or Verification Steps

  • To verify the fix, query SELECT * FROM sys.dm_resource_governor_configuration; and confirm the is_reconfiguration_pending column returns 0, indicating the configuration loaded successfully.
  • If the error persists after these steps, start the SQL Server instance using the -f (minimal configuration) startup parameter via Configuration Manager to bypass Resource Governor loading entirely, then manually rebuild the configuration using ALTER RESOURCE GOVERNOR RESET STATISTICS;.

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

Troubleshooting Guide: SQL Server Error 10988 – Workspace Memory Limit Reached

Why This Error Happens

Error 10988 occurs when a query’s workspace memory grant exceeds the internal limit configured for a single query execution, typically due to complex sorts, hash joins, or large resultset operations exceeding available memory grant thresholds. This is commonly triggered by the Resource Governor workspace memory cap (max memory per query) being set too low relative to the actual query complexity, or by outdated statistics causing the optimizer to underestimate/overestimate memory requirements. In some cases, this also surfaces when multiple concurrent heavy queries compete for the same workspace memory pool, exhausting the per-query allocation ceiling.

Step-by-Step Resolution Guide

Step 1: Review and Adjust the Resource Governor Workspace Memory Settings

  • Open SQL Server Management Studio (SSMS) and connect to the instance.
  • Run SELECT * FROM sys.dm_resource_governor_workload_groups; to check current max_memory_percent values.
  • If using a custom Resource Pool, increase the MAX_MEMORY_PERCENT using:
  ALTER WORKLOAD GROUP [YourGroupName] WITH (REQUEST_MAX_MEMORY_GRANT_PERCENT = 50);
  ALTER RESOURCE GOVERNOR RECONFIGURE;
  • Avoid setting this value too high, as it can starve other concurrent queries.

Step 2: Update Statistics and Rebuild Indexes

  • Outdated statistics often cause the query optimizer to request excessive memory grants.
  • Run EXEC sp_updatestats; on the affected database.
  • Rebuild fragmented indexes using:
  ALTER INDEX ALL ON [YourTable] REBUILD;
  • Re-execute the failing query to see if the memory grant estimate improves.

Step 3: Optimize the Offending Query

  • Use SET STATISTICS XML ON; before running the query to capture the actual execution plan.
  • Look for excessive Sort or Hash Match operators consuming large memory grants.
  • Break the query into smaller batches or add appropriate indexes to reduce sort/hash operations.
  • Consider adding OPTION (RECOMPILE) to force a fresh, accurate estimate if parameter sniffing is suspected.

Step 4: Increase Server-Level Memory Configuration (If Applicable)

  • Verify total instance memory via sp_configure 'max server memory (MB)';.
  • On Windows Server 2025 / Windows 11 hosts with sufficient physical RAM, increase this value:
  EXEC sp_configure 'max server memory (MB)', 16384;
  RECONFIGURE;
  • Restart the SQL Server service via services.msc or Restart-Service MSSQLSERVER in PowerShell for changes to take effect if required.

Alternative or Verification Steps

  • Re-run the previously failing query and confirm Error 10988 no longer appears in the SQL Server Error Log (Management > SQL Server Logs in SSMS).
  • If the issue persists, use sys.dm_exec_query_memory_grants to identify real-time memory grant bottlenecks and further tune the Resource Governor workload group limits.

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

Troubleshooting Guide: Error 10986 – Resource Governor Configuration Load Failure

Why This Error Happens

Error 10986 occurs when SQL Server 2025 attempts to load the Resource Governor configuration from the replicated master database during startup or reconfiguration, but encounters a mismatch, corruption, or access restriction. This is typically caused by a corrupted or out-of-sync system catalog (sys.resourcegovernorconfiguration), insufficient permissions on the master database replication objects, or an incomplete replication sync between distributor and subscriber instances. In some cases, this also surfaces after an in-place upgrade to SQL Server 2025 where Resource Governor schema changes were not properly migrated during the replicated master refresh.

Step-by-Step Resolution Guide

Step 1: Verify Resource Governor Service State and Permissions

  • Open SQL Server Management Studio (SSMS) and connect using an account with sysadmin privileges.
  • Run SELECT * FROM sys.resource_governor_configuration; to check if the catalog is accessible and returns valid rows.
  • Confirm the SQL Server service account has read/write access to C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\DATA\master.mdf.
  • Check Windows Event Viewer under Applications and Services Logs > MSSQLSERVER for correlating permission-denied entries tied to Event ID 10986.

Step 2: Reset and Reapply Resource Governor Configuration

  • Execute ALTER RESOURCE GOVERNOR DISABLE; to safely disable the current configuration.
  • Run ALTER RESOURCE GOVERNOR RECONFIGURE; to force a clean reload attempt.
  • If the error persists, drop and recreate custom resource pools and workload groups manually using DROP RESOURCE POOL and CREATE RESOURCE POOL statements.
  • Restart the SQL Server service via PowerShell: Restart-Service -Name 'MSSQLSERVER' -Force.

Step 3: Repair Replication Sync Between Master and Subscriber

  • Open Replication Monitor in SSMS and check the status of the publication tied to the master database.
  • Run sp_replrestart on the distributor to force a resynchronization of replicated metadata.
  • If replication is broken, remove and recreate the subscription using sp_dropsubscription followed by sp_addsubscription, ensuring the “with sync” option is set to automatic.
  • Validate that the Distribution Agent job is running without errors in SQL Server Agent.

Step 4: Validate System Catalog Integrity

  • Run DBCC CHECKDB('master') WITH NO_INFOMSGS, ALL_ERRORMSGS; to rule out underlying corruption.
  • If corruption is found, restore the master database from a verified backup using RESTORE DATABASE master FROM DISK = 'D:\Backups\master.bak' WITH REPLACE; (ensure SQL Server is started in single-user mode via -m startup parameter first).

Alternative or Verification Steps

  • After applying fixes, run SELECT * FROM sys.dm_resource_governor_configuration; and confirm the is_reconfiguration_pending column returns 0, indicating a successful load.
  • If the issue persists despite the above steps, consider rebuilding the Resource Governor configuration entirely via sp_configure 'show advanced options', 1; RECONFIGURE; followed by a manual recreation of all pools and groups, then failover to a secondary replica if running in an Always On Availability Group to isolate whether the issue is node-specific.

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

Troubleshooting Guide: SQL Server Error 10984 — Resource Governor Reconfiguration Failed

Why This Error Happens

Error 10984 occurs when SQL Server 2025’s Resource Governor fails to apply a new configuration, typically because the ALTER RESOURCE GOVERNOR RECONFIGURE statement conflicts with an internal memory broker state or an active workload group that cannot be safely remapped. This is commonly triggered by corrupted or orphaned resource pool metadata, insufficient memory available to reallocate MINMEMORYPERCENT guarantees across pools, or a classifier function referencing an invalid or dropped workload group. In some cases, the service account lacks the ALTER ANY RESOURCE GOVERNOR permission required to commit the pending configuration.

Step-by-Step Resolution Guide

Step 1: Verify Permissions and Current Configuration State

  • Confirm the login executing the command has CONTROL SERVER or ALTER ANY RESOURCE GOVERNOR permission.
  • Run SELECT * FROM sys.dm_resource_governor_configuration; to check if is_reconfiguration_pending is stuck at 1.
  • Cross-check active pools with SELECT * FROM sys.resource_governor_resource_pools; for orphaned or disabled entries.

Step 2: Validate Resource Pool and Workload Group Definitions

  • Open SQL Server Management Studio (SSMS) and navigate to Management > Resource Governor.
  • Ensure no workload group references a resource pool that was dropped without ALTER RESOURCE GOVERNOR RECONFIGURE being run afterward.
  • Manually script out the current configuration using sp_helprole equivalents or sys.resource_governor_workload_groups to spot invalid GROUP_MAX_REQUESTS or IMPORTANCE values.

Step 3: Clear Memory Broker Conflicts

  • Check the SQL Server Error Log (default path: C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Log\ERRORLOG) for preceding memory broker warnings.
  • If a memory grant conflict is logged, restart the SQL Server service via PowerShell:
  Restart-Service -Name 'MSSQLSERVER' -Force
  • After restart, re-run ALTER RESOURCE GOVERNOR RECONFIGURE; in a fresh SSMS query window.

Step 4: Rebuild the Resource Governor Configuration

  • If reconfiguration still fails, disable Resource Governor entirely: ALTER RESOURCE GOVERNOR DISABLE;
  • Drop the problematic workload group and pool using DROP WORKLOAD GROUP [GroupName]; and DROP RESOURCE POOL [PoolName];
  • Recreate the pool and group definitions from a known-good backup script, then re-enable with ALTER RESOURCE GOVERNOR RECONFIGURE;

Alternative or Verification Steps

  • Verify the fix by querying SELECT is_reconfiguration_pending FROM sys.dm_resource_governor_configuration; — a value of 0 confirms success.
  • If the issue persists after rebuilding, use DBCC FREEPROCCACHE to clear any cached execution plans that may be holding stale classifier function references, then retry the reconfiguration.

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

Troubleshooting Guide: SQL Server Error 10985 — Resource Governor Reconfiguration Failure

Why This Error Happens

Error 10985 occurs when SQL Server’s Resource Governor attempts to apply a new configuration (via ALTER RESOURCE GOVERNOR RECONFIGURE) but fails at the HRESULT level, typically due to insufficient memory to allocate new internal workload group or pool structures. This can also stem from corrupted internal metadata in sys.resource_governor_configuration, conflicting resource pool definitions, or the SQL Server service account lacking sufficient privileges to adjust system resource allocations (such as CPU affinity or memory partitioning) at the OS level. In virtualized or containerized Windows Server 2025 environments, NUMA node misreporting can also trigger this HRESULT failure during reconfiguration.

Step-by-Step Resolution Guide

Step 1: Verify Current Resource Governor State and Pending Changes

  • Run SELECT * FROM sys.dm_resource_governor_configuration; to check if a reconfiguration is stuck in a pending state.
  • Compare this against SELECT * FROM sys.resource_governor_configuration; to identify mismatches between the in-memory and persisted configuration.
  • Check the SQL Server Error Log (C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Log\ERRORLOG) for the exact HRESULT value accompanying Error 10985.

Step 2: Validate Memory and NUMA Configuration

  • Open Task Manager or perfmon.exe on Windows Server 2025 to confirm available system memory isn’t critically low at the time of reconfiguration.
  • Run DBCC MEMORYSTATUS; in SSMS to inspect SQL Server’s internal memory broker allocations.
  • If running in a VM, confirm NUMA node mapping is consistent by checking SELECT * FROM sys.dm_os_nodes; — mismatches here often correlate with HRESULT allocation failures.
  • Restart the SQL Server service if NUMA node count appears incorrect: Restart-Service -Name 'MSSQLSERVER' -Force (run in elevated PowerShell).

Step 3: Rebuild or Reset the Resource Governor Configuration

  • Disable Resource Governor temporarily: ALTER RESOURCE GOVERNOR DISABLE;
  • Drop any custom workload groups or pools that may have corrupted definitions: DROP WORKLOAD GROUP [GroupName]; and DROP RESOURCE POOL [PoolName];
  • Reset to default configuration: ALTER RESOURCE GOVERNOR RESET STATISTICS; followed by ALTER RESOURCE GOVERNOR RECONFIGURE;
  • If the error persists, drop and recreate the classifier function (if one is assigned) since a faulty classifier can block reconfiguration.

Step 4: Check Service Account Permissions

  • Open Local Security Policy (secpol.msc) on Windows Server 2025.
  • Navigate to Local Policies > User Rights Assignment and confirm the SQL Server service account has the “Lock pages in memory” and “Adjust memory quotas for a process” rights assigned.
  • Apply changes and restart the SQL Server service for the permissions to take effect.

Step 5: Apply Latest Cumulative Update

  • Check the installed build number: SELECT @@VERSION;
  • Download and install the latest Cumulative Update (CU) for SQL Server 2025 from the Microsoft Update Catalog, as early releases may contain unresolved Resource Governor allocation bugs.
  • Reboot the server after patching to ensure all binaries and services load cleanly.

Alternative or Verification Steps

  • To verify the fix, run ALTER RESOURCE GOVERNOR RECONFIGURE; again and confirm no error is returned, then check sys.dm_resource_governor_configuration to ensure is_reconfiguration_pending returns 0.
  • If the issue persists after all steps, as a fallback, completely disable Resource Governor (ALTER RESOURCE GOVERNOR DISABLE;) and restart the SQL Server instance to clear any corrupted in-memory state before re-enabling and reapplying configurations incrementally.

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

Troubleshooting Guide: SQL Server Error 10982 – Resource Governor Classifier Function Failure

Why This Error Happens

Error 10982 occurs when the Resource Governor’s user-defined classifier function fails during execution, typically because the function encounters an unhandled T-SQL error, a permissions issue, or attempts an invalid operation (such as querying system views the function doesn’t have access to, or encountering a timeout). This can also happen if the classifier function references objects that have been altered, dropped, or renamed since the function was last validated, or if the login executing the connection lacks sufficient permissions to run the function logic. In some cases, resource exhaustion or tempdb contention during logon can cause the classifier to fail mid-execution, triggering this error and forcing new connections into the default resource pool.

Step-by-Step Resolution Guide

Step 1: Identify the Failing Classifier Function and Review the Error Log

  • Open SQL Server Error Log via SSMS (Management > SQL Server Logs) or check C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Log\ERRORLOG.
  • Locate the full error message including the “Last error %u” value — this numeric code points to the underlying T-SQL failure (e.g., permission denied, object not found).
  • Note the exact classifier function name referenced in the error (e.g., dbo.fn_classifier).

Step 2: Validate and Test the Classifier Function Manually

  • Connect to SQL Server using SSMS with administrative/sysadmin credentials.
  • Run the classifier function directly in a query window to check for runtime errors:
  SELECT dbo.fn_classifier();
  • Check for broken object references using:
  SELECT * FROM sys.dm_resource_governor_configuration;
  • Verify the function doesn’t reference dropped tables, altered columns, or use blocking/long-running queries (classifier functions must execute quickly, ideally under 1 second).

Step 3: Check Permissions on the Classifier Function and Referenced Objects

  • Ensure the public role (or the logins attempting to connect) has EXECUTE permission on the classifier function:
  GRANT EXECUTE ON dbo.fn_classifier TO public;
  • Confirm the function owner has appropriate permissions on any tables/views it queries (common cause: function queries a table in a user database, but logins connecting are mapped only to master).
  • If the function queries user databases, ensure it uses three-part naming and that the referenced database is online and accessible.

Step 4: Disable Resource Governor Temporarily to Restore Connectivity

  • If logins are being blocked from connecting, disable Resource Governor to restore access immediately:
  ALTER RESOURCE GOVERNOR DISABLE;
  • This allows all new connections to bypass the classifier function and connect using the default pool while you troubleshoot.
  • Re-enable only after confirming the fix:
  ALTER RESOURCE GOVERNOR RECONFIGURE;

Step 5: Correct the Classifier Function Logic and Redeploy

  • Rewrite the function to include error handling (TRY/CATCH) and a fallback return value (e.g., 'default' pool) if the primary logic fails.
  • Drop and recreate the function, then reassign it:
  ALTER RESOURCE GOVERNOR WITH (CLASSIFIER_FUNCTION = dbo.fn_classifier_fixed);
  ALTER RESOURCE GOVERNOR RECONFIGURE;
  • Restart the SQL Server service via Services.msc or net stop MSSQLSERVER && net start MSSQLSERVER if changes don’t take effect immediately.

Alternative or Verification Steps

  • Verify the fix by opening a new connection with a test login and confirming it classifies correctly into the expected resource pool using SELECT * FROM sys.dm_exec_sessions WHERE group_id = <pool_id>;.
  • If the error persists, run SQL Server in single-user mode (sqlservr.exe -m) to bypass the classifier entirely, fix the function offline, then restart normally.

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

Troubleshooting Guide: Error 10983 – Resource Governor Operation Canceled

Why This Error Happens

This error occurs when a Resource Governor DDL operation (such as ALTER RESOURCE GOVERNOR RECONFIGURE or creating/altering a workload group or resource pool) is explicitly canceled before it completes, typically due to a query timeout, a manual cancellation (Ctrl+C in SSMS or killing the session), or a conflicting administrative session holding a lock on the Resource Governor metadata. It can also surface when an automated deployment script or ORM tool issues a cancel request after exceeding its configured command timeout while SQL Server is still applying the configuration changes. In rare cases, corrupted or inconsistent Resource Governor internal state (left over from a previous failed reconfiguration) causes the engine to abort the operation defensively and raise this error.

Step-by-Step Resolution Guide

Step 1: Identify the Source of the Cancellation

  • Check SQL Server Error Log (C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Log\ERRORLOG) for the exact timestamp of Error 10983.
  • Cross-reference with SSMS query history or any deployment/CI pipeline logs (e.g., Azure DevOps, Jenkins) to see if a command timeout triggered the cancel.
  • Run the following to check for blocking sessions on Resource Governor metadata:
  SELECT * FROM sys.dm_exec_requests WHERE command LIKE '%RESOURCE GOVERNOR%';

Step 2: Increase Client and Query Timeout Settings

  • In SSMS, go to Tools > Options > Query Execution > SQL Server > General and increase “Execution time-out” from the default (0 or 30s) to at least 120 seconds.
  • If using a deployment script (PowerShell, sqlcmd, or application connection string), explicitly set CommandTimeout to 120 or higher:
  Invoke-Sqlcmd -Query $query -ServerInstance $server -QueryTimeout 120
  • Re-run the Resource Governor configuration statement.

Step 3: Clear Any Stale Resource Governor State

  • Run ALTER RESOURCE GOVERNOR RESET STATISTICS; to clear any inconsistent internal counters.
  • Verify no pending configuration is stuck:
  SELECT * FROM sys.resource_governor_configuration;
  SELECT * FROM sys.resource_governor_workload_groups;
  • If a pending ALTER is stuck, restart the SQL Server service via Services.msc or:
  Restart-Service -Name MSSQLSERVER -Force

Step 4: Reapply the Resource Governor Configuration

  • Re-issue the full configuration sequence in order, ensuring RECONFIGURE is the final statement:
  ALTER RESOURCE GOVERNOR DISABLE;
  -- Recreate/alter pools and workload groups here
  ALTER RESOURCE GOVERNOR RECONFIGURE;
  • Run this from a dedicated administrative connection (DAC) if standard connections keep timing out:
  sqlcmd -S admin:YourServerName -E

Alternative or Verification Steps

  • Confirm success by querying SELECT * FROM sys.resource_governor_configuration; and checking the is_reconfiguration_pending column returns 0.
  • If the issue persists, disable and fully reset Resource Governor to defaults with ALTER RESOURCE GOVERNOR DISABLE; ALTER RESOURCE GOVERNOR RECONFIGURE;, then rebuild pools/groups incrementally to isolate which object triggers the cancellation.

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

Troubleshooting Guide: SQL Server Error 10981 – Resource Governor Reconfiguration

Why This Error Happens

Error 10981 is actually an informational message, not a failure—it confirms that the ALTER RESOURCE GOVERNOR RECONFIGURE statement executed successfully and the new resource pool, workload group, or classifier function settings are now active. However, users often “chase” this message as an error when subsequent query performance doesn’t change, which typically indicates the classifier function is misrouting sessions or the resource pool limits (MAXCPUPERCENT, MAXMEMORYPERCENT) were set incorrectly before the reconfigure. In rare cases, this message appears alongside a failed state because a dependent pool or group referenced in the configuration was dropped or locked by an active session, causing the engine to silently fall back to the default configuration.

Step-by-Step Resolution Guide

Step 1: Confirm Resource Governor Is Actually Running

  • Open SQL Server Management Studio (SSMS) and connect to the instance.
  • Run the following query to check the current state:
SELECT is_enabled FROM sys.resource_governor_configuration;
  • If is_enabled returns 0, Resource Governor is disabled despite the reconfigure message, meaning your changes are staged but not active.

Step 2: Validate Classifier Function and Workload Group Mapping

  • Check which classifier function is currently assigned:
SELECT classifier_function_id, is_enabled 
FROM sys.resource_governor_configuration;
  • Ensure the function referenced in sys.objects (via the ID above) hasn’t been altered or dropped.
  • Test session classification manually by running a sample login under an affected service account and checking sys.dm_exec_sessions for the group_id assigned.

Step 3: Re-Apply Configuration with Explicit ALTER Statements

  • In SSMS, run the full reconfiguration sequence explicitly rather than relying on the GUI wizard:
ALTER RESOURCE GOVERNOR RESET STATISTICS;
ALTER RESOURCE GOVERNOR RECONFIGURE;
  • Navigate to C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Log\ERRORLOG on Windows Server 2025 and search for “Resource Governor” entries timestamped at your last reconfigure attempt.
  • Confirm no conflicting ALTER RESOURCE POOL statements are queued in an open transaction from another session (check sys.dm_tran_locks for schema locks on resource_governor metadata).

Step 4: Restart the Resource Governor Cache (If Settings Appear Stuck)

  • If pools or groups still show stale limits after reconfigure, clear the plan cache tied to classification:
DBCC FREEPROCCACHE;
  • Restart the SQL Server service via services.msc on Windows Server 2025/Windows 11 only if the stale state persists after cache clearing (this is a last-resort step since it drops all cached plans instance-wide).

Alternative or Verification Steps

  • Verify the fix by querying sys.dm_resource_governor_resource_pools and confirming the max_cpu_percent and max_memory_percent columns match your intended configuration values.
  • If sessions are still misclassified after reconfigure, bypass the classifier temporarily by connecting via the Dedicated Admin Connection (DAC) and manually reviewing/rewriting the classifier function logic before re-running ALTER RESOURCE GOVERNOR RECONFIGURE.

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

Troubleshooting Guide: Error 10938 – Contained Availability Group Connections Do Not Support Resource Governor DDL

Why This Error Happens

This error occurs because contained Availability Group (AG) listener connections route traffic through a database-level containment boundary that intentionally restricts access to instance-wide (server-scoped) DDL operations. Resource Governor configuration—such as creating or altering resource pools, workload groups, or classifier functions—requires a true instance-level connection context, which contained AG connections do not provide by design. This is a security and architectural safeguard introduced to prevent contained databases from making changes that affect the entire SQL Server instance, not a bug or misconfiguration.

Step-by-Step Resolution Guide

Step 1: Identify the Connection String Being Used

  • Check your application or SSMS connection properties to confirm whether it is connecting via the AG listener name with a contained database context (e.g., Initial Catalog set to a contained database).
  • Look for connection strings that include Database=<ContainedDBName> pointed at the AG listener endpoint.
  • Confirm this is the source of the issue by reviewing the SQL Server error log for Event ID 10938 timestamps that correlate with your DDL execution attempts.

Step 2: Reconnect Using the Direct Instance Name

  • Open SSMS or your management tool and create a new connection using the actual instance name or FQDN of the primary replica (not the AG listener).
  • Example: Replace Server=AGListener01;Database=MyContainedDB; with Server=SQLNODE01\INSTANCE01;Database=master;
  • Ensure you are connecting to the primary replica since Resource Governor DDL (ALTER RESOURCE GOVERNOR RECONFIGURE, CREATE WORKLOAD GROUP, etc.) can only be executed there.

Step 3: Execute Resource Governor DDL Commands via the Instance Connection

  • In a new query window connected directly to the instance, run your required Resource Governor statements, for example:
  USE master;
  GO
  ALTER RESOURCE GOVERNOR RECONFIGURE;
  GO
  • Avoid executing these commands while your session’s Database context is set to a contained database—switch explicitly to master first.

Step 4: Update Application Connection Logic (If Applicable)

  • If an application or automation script triggered this error, modify the connection pooling or failover logic to split traffic: route transactional workloads through the AG listener, and route administrative/DDL tasks through a dedicated instance-level connection string stored in configuration.
  • Store this administrative connection string securely (e.g., in Windows Credential Manager or an encrypted config file) since it will bypass AG redirection.

Alternative or Verification Steps

  • Verify the fix: Run SELECT SERVERPROPERTY('IsSrvRoleMember') or check sys.dm_exec_connections to confirm you are connected to the instance context (not a contained database session) before re-running the Resource Governor DDL—it should now complete without Error 10938.
  • Alternative approach: If direct instance access is restricted by network policy, request a temporary firewall exception or VPN route to the primary replica’s dedicated admin connection (DAC) port, then execute the DDL via sqlcmd -A.

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

Troubleshooting Guide: Error 10961 – CPU Usage Exceeds Workload Group Limit in SQL Server 2025

Why This Error Happens

This error occurs when SQL Server’s Resource Governor is configured with a CPU cap (MAX_CPU_PERCENT) on a workload group, and a query or session exceeds that threshold during execution. This is typically caused by either an overly restrictive Resource Governor policy being applied to a classifier function/login, or a poorly optimized query (missing indexes, bad execution plan) consuming abnormal CPU cycles. It can also occur after a migration or restore where Resource Governor settings were carried over without adjustment for the new hardware’s core count.

Step-by-Step Resolution Guide

Step 1: Identify the Affected Workload Group and Current Limits

  • Open SQL Server Management Studio (SSMS) and connect to the instance via a Dedicated Admin Connection (DAC) if the instance is unresponsive: sqlcmd -S ADMIN:ServerName.
  • Run the following query to check current Resource Governor configuration:
  SELECT * FROM sys.resource_governor_workload_groups;
  • Note the group_id and max_cpu_percent value tied to the session throwing Error 10961.

Step 2: Adjust the MAXCPUPERCENT Setting

  • Alter the specific workload group to increase or remove the CPU cap. Replace WorkloadGroupName with your actual group name:
  ALTER WORKLOAD GROUP WorkloadGroupName 
  WITH (MAX_CPU_PERCENT = 100);
  • Apply the configuration changes immediately for them to take effect:
  ALTER RESOURCE GOVERNOR RECONFIGURE;
  • If this is a temporary diagnostic step, consider disabling Resource Governor entirely to confirm it is the root cause: ALTER RESOURCE GOVERNOR DISABLE;

Step 3: Optimize the Offending Query

  • Use SQL Server Profiler or Extended Events to capture the specific query ID associated with the RESOURCE_GOVERNOR_CPU_RATE_LIMIT wait type.
  • Check the execution plan for missing indexes or table scans using SET STATISTICS IO, TIME ON;.
  • Rebuild or reorganize fragmented indexes on the tables involved in the query to lower the CPU overhead required for execution.

Step 4: Re-evaluate the Classifier Function

  • Navigate to the Resource Governor classifier function in SSMS under Management > Resource Governor > Classifier Function.
  • Ensure the logic correctly routes high-priority ETL or admin logins to the default group (unrestricted) rather than a restricted Reporting group.
  • Update the function and run ALTER RESOURCE GOVERNOR RECONFIGURE; again to apply the new routing logic.

Alternative or Verification Steps

  • Verify the Fix: Monitor the sys.dm_resource_governor_workload_groups DMV for the max_cpu_percent column to confirm it reflects the new value, and check the SQL Server Error Log to ensure Error 10961 no longer appears during peak load.
  • Alternative Solution: If performance remains inconsistent, consider migrating the workload to a higher MAXDOP (Max Degree of Parallelism) setting at the instance level, as sometimes CPU throttling is compounded by excessive parallelism fighting for the same capped resource pool.

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

Troubleshooting Guide: SQL Server Error 10937 – Default Workload Group Attribute Alteration Failure

Why This Error Happens

This error occurs when an application or administrator attempts to modify specific attributes (such as IMPORTANCE, REQUEST_MAX_MEMORY_GRANT_PERCENT, or GROUP_MAX_REQUESTS) on the built-in default workload group within Resource Governor. SQL Server 2025 restricts certain property changes on the default and internal groups because they are reserved system objects designed to maintain baseline resource allocation stability. This typically happens when a migration script, a third-party monitoring tool, or a DBA unintentionally runs an ALTER WORKLOAD GROUP statement against the default group instead of a custom user-defined group.

Step-by-Step Resolution Guide

Step 1: Identify the Offending Script or Query

  • Check the SQL Server Error Log or Extended Events session for the exact T-SQL statement that triggered Error 10937.
  • Look for ALTER WORKLOAD GROUP [default] syntax in deployment scripts, DACPAC files, or ORM-generated migrations.
  • Run the following to confirm which group is being targeted:
  SELECT name, group_id FROM sys.resource_governor_workload_groups;

Step 2: Redirect Changes to a Custom Workload Group

  • Instead of modifying default, create or alter a dedicated workload group for your workload.
  • Use the following template to create a new group with the desired attributes:
  CREATE WORKLOAD GROUP [AppWorkloadGroup]
  WITH (IMPORTANCE = MEDIUM,
        REQUEST_MAX_MEMORY_GRANT_PERCENT = 25)
  USING [default];
  ALTER RESOURCE GOVERNOR RECONFIGURE;
  • Update your application’s connection classifier function to route sessions into AppWorkloadGroup rather than relying on default.

Step 3: Validate the Classifier Function Logic

  • Open the Resource Governor classifier function in SSMS (under Management > Resource Governor > Classifier Function Name).
  • Confirm the CASE logic does not fall through to default unintentionally for sessions that require custom limits.
  • Redeploy the classifier function if logic errors are found:
  ALTER FUNCTION dbo.rgClassifier() RETURNS sysname
  WITH SCHEMABINDING
  AS
  BEGIN
      -- updated routing logic here
  END;
  ALTER RESOURCE GOVERNOR RECONFIGURE;

Step 4: Restart Resource Governor Configuration

  • After updating workload groups and classifier logic, force a full reconfiguration to clear cached session bindings.
  • Run:
  ALTER RESOURCE GOVERNOR RECONFIGURE;
  • Restart the SQL Server service via Services.msc on Windows Server 2025 only if the reconfiguration does not take effect immediately.

Alternative or Verification Steps

  • Verify the fix by re-running the original deployment script or application connection test and confirming no Error 10937 appears in sys.dm_os_ring_buffers or the SQL Server Error Log.
  • If the error persists, query sys.dm_resource_governor_workload_groups to ensure sessions are now classified under your custom group instead of default, and double-check that no scheduled jobs or Agent steps still reference the default group directly.

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

Troubleshooting Guide: Error 10935 – External Resource Pool Processor Group Restriction

Why This Error Happens

This error occurs because SQL Server 2025’s external resource pools (used for PolyBase, Machine Learning Services, or external REST/language extensibility runtimes) are architecturally restricted to a single Windows processor group. When a host machine has NUMA configurations or CPU core counts exceeding 64 per group, Windows Server 2025 automatically spans multiple processor groups, and any ALTER RESOURCE POOL or CREATE EXTERNAL RESOURCE POOL statement that attempts to assign affinity across these groups will be rejected. This is typically triggered by manually configured AFFINITY PROCESSORGROUP settings or default auto-affinitization on high-core-count servers.

Step-by-Step Resolution Guide

Step 1: Identify Current Processor Group Topology

  • Open SQL Server Management Studio (SSMS) and run SELECT * FROM sys.dm_os_nodes; to view active NUMA nodes and their associated processor groups.
  • Cross-check against Windows itself by running Get-WmiObject Win32_Processor | Select-Object NumberOfLogicalProcessors in PowerShell to confirm total logical core count.
  • Note which processor group(s) the external resource pool is currently attempting to span.

Step 2: Modify the External Resource Pool Affinity Settings

  • Run ALTER EXTERNAL RESOURCE POOL [PoolName] WITH (AFFINITY PROCESSORGROUP = 0); to restrict the pool to a single valid group (replace 0 with the correct group number from Step 1).
  • Avoid using the AUTO affinity keyword for external resource pools on multi-group hardware, as this can cause SQL Server to attempt a dynamic allocation across groups.
  • Execute RECONFIGURE; after the alter statement to apply the change immediately.

Step 3: Restart the SQL Server Service and Associated Launchpad

  • Open Services.msc on Windows Server 2025 and restart the “SQL Server (MSSQLSERVER)” service.
  • Also restart the “SQL Server Launchpad” service, as external resource pools rely on this service for extensibility hosting (Python/R/Java/REST runtimes).
  • Verify there are no lingering ExtHost.exe or Launchpad.exe processes in Task Manager before restarting.

Step 4: Validate Resource Governor Configuration

  • Open SSMS, navigate to Management > Resource Governor > External Resource Pools.
  • Confirm the pool’s “Processor Affinity” property shows a single group value rather than “ALL” or a multi-group range.
  • If using sp_configure, ensure 'affinity mask' and 'affinity64 mask' legacy settings are not conflicting with the new processor group affinity syntax.

Alternative or Verification Steps

  • Run SELECT pool_id, name, affinity_type, scheduler_count FROM sys.dm_resource_governor_resource_pool_affinity; to confirm the external pool now reports a single, consistent processor group.
  • If the error persists, disable Resource Governor temporarily with ALTER RESOURCE GOVERNOR DISABLE;, rebuild the external resource pool definition from scratch with explicit single-group affinity, then re-enable Resource Governor with ALTER RESOURCE GOVERNOR RECONFIGURE;.

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

Troubleshooting Guide: SQL Server Error 10936 — Elastic Pool Resource Limit Reached

Why This Error Happens

Error 10936 occurs when a database operating within an Azure SQL or Managed Instance elastic pool exceeds one of the pool’s shared resource limits, such as concurrent worker threads, sessions, or DTU/vCore allocation. This typically happens because the elastic pool’s resource ceiling (eDTU or vCore cap) is undersized relative to the aggregate workload of all databases sharing that pool. It can also occur when a single runaway query or connection leak within one database consumes a disproportionate share of the pool’s finite resources, starving other databases in the same pool.

Step-by-Step Resolution Guide

Step 1: Identify the Specific Resource Being Throttled

  • Check the exact error message text — it references a specific %ls placeholder (e.g., “worker threads,” “sessions,” or “database transaction units”) that identifies which limit was hit.
  • Run SELECT * FROM sys.dm_db_resource_stats; against the affected database to review recent resource consumption trends.
  • Query sys.dm_elastic_pool_resource_stats (on the pool’s logical server) to see pool-wide utilization over the last 14 days.

Step 2: Review and Scale the Elastic Pool Configuration

  • Open the Azure Portal or SQL Server Management Studio (SSMS 21+) connected to your Windows Server 2025 host.
  • Navigate to the elastic pool resource and compare current eDTU/vCore settings against peak usage from Step 1.
  • Increase the pool’s service tier or max resource allocation using T-SQL:
  ALTER DATABASE ServerName MODIFY (SERVICE_OBJECTIVE = ELASTIC_POOL(name = 'YourPoolName'));
  • Adjust DATABASE_MAX_SIZE, MAX_DTU, or MIN_DTU per-database settings so no single database can monopolize pool capacity.

Step 3: Isolate and Throttle the Offending Database

  • Use Query Store (enabled by default in SQL Server 2025) to pinpoint high-cost queries causing the spike.
  • Run sys.dm_db_resource_stats filtered per-database to confirm which tenant database is driving the limit breach.
  • Apply a per-database MAX_DTU or MAX_CPU_PERCENT cap using Resource Governor to prevent one database from exhausting shared pool resources.

Step 4: Restart the SQL Server Service and Validate Connectivity

  • Open Services.msc on Windows Server 2025, locate SQL Server (MSSQLSERVER), and restart the service to clear any stale resource locks.
  • Alternatively, use PowerShell:
  Restart-Service -Name 'MSSQLSERVER' -Force
  • Confirm the SQL Server Error Log (Management > SQL Server Logs in SSMS) no longer shows recurring Error 10936 entries.

Alternative or Verification Steps

  • Re-run the workload that originally triggered Error 10936 and monitor sys.dm_elastic_pool_resource_stats in real time to confirm utilization stays below 100% of the pool’s cap.
  • If scaling the pool isn’t feasible, consider migrating the heaviest database out of the shared elastic pool into a standalone, dedicated compute tier to eliminate contention entirely.

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

Troubleshooting Guide: SQL Server Error 10934 – External Resource Pool Does Not Exist

Why This Error Happens

This error occurs when a query, application, or PolyBase/external process attempts to reference an external resource pool by name that has not been created or has been dropped from the SQL Server instance. It commonly happens when resource governor configurations are migrated between servers without exporting the external resource pool definitions, or when a deployment script references a pool name that was manually deleted or renamed. Additionally, this can surface if the Resource Governor was reconfigured or reset (ALTER RESOURCE GOVERNOR RESET STATISTICS) without recreating the external pools used by PolyBase or machine learning services.

Step-by-Step Resolution Guide

Step 1: Verify Existing External Resource Pools

  • Open SQL Server Management Studio (SSMS) and connect to the SQL Server 2025 instance.
  • Run the following query to list all current external resource pools:
  SELECT * FROM sys.resource_governor_external_resource_pools;
  • Confirm whether the pool name referenced in the error (shown as %.*ls in the message) is missing from the results.

Step 2: Recreate the Missing External Resource Pool

  • If the pool is confirmed missing, create it using T-SQL with appropriate resource limits:
  CREATE EXTERNAL RESOURCE POOL [PoolName]
  WITH (MAX_CPU_PERCENT = 100, MAX_MEMORY_PERCENT = 100);
  • Replace [PoolName] with the exact name referenced in the failing query or application config.
  • If this pool is tied to PolyBase, ensure the pool name matches exactly what is referenced in sp_configure 'polybase enabled' dependent scripts.

Step 3: Reapply Resource Governor Configuration

  • After creating the pool, apply the new configuration so SQL Server recognizes it:
  ALTER RESOURCE GOVERNOR RECONFIGURE;
  • Restart the SQL Server Resource Governor-dependent services if using PolyBase:
  • Open Services.msc on Windows Server 2025 / Windows 11.
  • Restart SQL Server PolyBase Engine and SQL Server PolyBase Data Movement services.

Step 4: Check Server-Level Scripts and Dependencies

  • Review any deployment or DevOps pipeline scripts (e.g., DACPAC, SSDT projects) that may hardcode the external resource pool name.
  • Update references in CREATE EXTERNAL DATA SOURCE or classifier functions (sys.sp_set_session_context) that depend on the pool name to match the recreated pool.

Alternative or Verification Steps

  • Re-run the original query or application action that triggered Error 10934 to confirm the pool now resolves correctly without exception.
  • If the issue persists, drop and fully recreate the Resource Governor configuration using DROP RESOURCE POOL (if applicable) followed by a fresh CREATE EXTERNAL RESOURCE POOL statement, then reconfigure via ALTER RESOURCE GOVERNOR RECONFIGURE.

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

Troubleshooting Guide: SQL Server Error 10932 — Resource Governor Configuration Failed

Why This Error Happens

Error 10932 typically occurs when SQL Server’s Resource Governor attempts to reconfigure memory pools or workload groups but encounters an inconsistency between the internal configuration cache and the system’s actual resource state. This is often triggered by corrupted Resource Governor metadata in the msdb or master system catalogs, insufficient memory available to allocate new resource pools, or a pending configuration change that was never properly applied via ALTER RESOURCE GOVERNOR RECONFIGURE. On Windows Server 2025 / Windows 11 hosts, this can be compounded by NUMA node misalignment or Hyper-V dynamic memory conflicts that prevent SQL Server from mapping resource pools correctly to the underlying hardware topology.

Step-by-Step Resolution Guide

Step 1: Verify Current Resource Governor State

  • Open SQL Server Management Studio (SSMS) and connect via an account with sysadmin or ALTER ANY RESOURCE GOVERNOR permission.
  • Run the following query to inspect current configuration status:
  SELECT * FROM sys.dm_resource_governor_configuration;
  SELECT * FROM sys.resource_governor_resource_pools;
  • Check the SQL Server Error Log (C:\Program Files\Microsoft SQL Server\MSSQL16.MSSQLSERVER\MSSQL\Log\ERRORLOG) for accompanying messages that specify which pool or workload group failed.

Step 2: Reset and Reapply Resource Governor Configuration

  • Disable Resource Governor temporarily to clear any pending bad state:
  ALTER RESOURCE GOVERNOR DISABLE;
  • Drop any custom resource pools or workload groups that may be corrupted:
  ALTER RESOURCE GOVERNOR RESET STATISTICS;
  DROP WORKLOAD GROUP IF EXISTS [YourWorkloadGroupName];
  DROP RESOURCE POOL IF EXISTS [YourResourcePoolName];
  • Re-create the pools/groups with corrected values, then apply changes:
  ALTER RESOURCE GOVERNOR RECONFIGURE;

Step 3: Check System Memory and NUMA Configuration

  • Open Task Manager > Performance > Memory on Windows Server 2025 to confirm available physical memory isn’t critically low.
  • Validate NUMA node mapping using:
  SELECT * FROM sys.dm_os_nodes;
  • If running under Hyper-V, ensure Dynamic Memory is disabled for the SQL Server VM (Hyper-V Manager > VM Settings > Memory) since fluctuating memory allocations can conflict with Resource Governor pool sizing.

Step 4: Restart the SQL Server Service

  • Restart via PowerShell with elevated privileges:
  Restart-Service -Name 'MSSQLSERVER' -Force
  • This clears any in-memory configuration locks tied to the failed Resource Governor state and forces a clean reload from the system catalog.

Alternative or Verification Steps

  • After restarting, re-run SELECT * FROM sys.dm_resource_governor_configuration; and confirm the is_reconfiguration_pending column returns 0.
  • If the error persists, run DBCC CHECKDB('msdb') to rule out system catalog corruption, and consider restoring msdb from a known-good backup if corruption is confirmed.

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

Troubleshooting Guide: SQL Server Error 10933

Why This Error Happens

Error 10933 occurs when a SQL Server process or component attempts to reference a scheduler ID that does not exist within the current CPU/scheduler topology. This typically happens after a CPU affinity mask misconfiguration, a change in the number of logical processors available to the Windows Server 2025 host, or a NUMA node configuration mismatch following a VM resource reallocation. It can also surface after restoring a configuration or resource governor pool setting that was exported from a server with a different core count.

Step-by-Step Resolution Guide

Step 1: Verify Current Scheduler Topology

  • Open SQL Server Management Studio (SSMS) and connect to the instance via a Dedicated Admin Connection (DAC) if the instance is unresponsive.
  • Run SELECT scheduler_id, cpu_id, status, is_online FROM sys.dm_os_schedulers WHERE status = 'VISIBLE ONLINE'; to list all valid scheduler IDs currently active on the system.
  • Note the highest valid scheduler_id value returned; any reference above this number is invalid.

Step 2: Check and Reset CPU Affinity Configuration

  • Open a query window and run EXEC sys.sp_configure 'affinity mask'; and EXEC sys.sp_configure 'affinity64 mask'; to review current settings.
  • If an affinity mask references decommissioned or non-existent CPUs, reset it using ALTER SERVER CONFIGURATION SET PROCESS AFFINITY CPU = AUTO;.
  • Restart the SQL Server service via services.msc or net stop MSSQLSERVER && net start MSSQLSERVER for the change to take effect.

Step 3: Validate Resource Governor Pool Settings

  • Run SELECT * FROM sys.dm_resource_governor_resource_pool_affinity; to check if any resource pool is manually bound to a scheduler that no longer exists.
  • If a stale mapping is found, run ALTER RESOURCE POOL [PoolName] WITH (AFFINITY SCHEDULER = AUTO); followed by ALTER RESOURCE GOVERNOR RECONFIGURE;.

Step 4: Confirm Host/VM Processor Allocation

  • On Windows Server 2025 Hyper-V hosts, open Hyper-V Manager and check the virtual machine’s Settings > Processor tab to confirm the vCPU count matches what SQL Server expects.
  • If running on bare metal, check Task Manager > Performance > CPU to confirm the logical processor count aligns with the max degree of parallelism and affinity settings in SQL Server.

Alternative or Verification Steps

  • After applying changes, re-run SELECT * FROM sys.dm_os_schedulers; and confirm no errors appear in the SQL Server Error Log (ERRORLOG file, typically located at C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Log\).
  • If the error persists after resetting affinity, restart the entire Windows Server 2025 host to force Windows to re-enumerate the processor topology, then restart the SQL Server service.

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

Troubleshooting Guide: Error 10930 – “The Service Is Currently Too Busy”

Why This Error Happens

Error 10930 in Microsoft SQL Server 2025 typically occurs when the Resource Governor or internal workload throttling mechanism detects that the server has exceeded its configured concurrency or resource limits for a given workload group. This is common in Azure SQL-style elastic pool configurations or on-premises deployments where MAX_DOP, memory grants, or concurrent request thresholds have been capped too aggressively. It can also surface when tempdb contention or a saturated connection pool prevents the Database Engine from admitting new session requests in a timely manner.

Step-by-Step Resolution Guide

Step 1: Verify Current Resource Governor Configuration

  • Open SQL Server Management Studio (SSMS) and connect to the instance.
  • Run SELECT * FROM sys.resource_governor_workload_groups; to inspect current limits.
  • Check for artificially low REQUEST_MAX_CPU_TIME_SEC or MAX_DOP values that may be rejecting incoming requests.

Step 2: Increase Concurrent Request Thresholds

  • Navigate to Management > Resource Governor in SSMS Object Explorer.
  • Right-click the relevant workload group (commonly default or a custom group) and select Properties.
  • Adjust GROUP_MAX_REQUESTS from its current value to a higher threshold (e.g., from 50 to 150) based on observed peak load.
  • Apply changes and run ALTER RESOURCE GOVERNOR RECONFIGURE; to commit them live.

Step 3: Clear Connection Pool Saturation

  • On the application server (Windows Server 2025 / Windows 11), open Services.msc and restart the dependent application pool or service consuming SQL connections.
  • Check Max Pool Size in your application’s connection string — if set below actual concurrent demand, raise it (e.g., Max Pool Size=200;).
  • Run DBCC FREESYSTEMCACHE('ALL'); on the instance to release stale cached plans consuming worker threads.

Step 4: Review tempdb Contention

  • Query SELECT * FROM sys.dm_os_waiting_tasks WHERE wait_type LIKE 'PAGELATCH%'; to check for tempdb allocation bottlenecks.
  • If contention is found, navigate to the tempdb data file properties in SSMS and add additional data files (typically matching the number of logical CPU cores, up to 8).
  • Restart the SQL Server service via SQL Server Configuration Manager for file changes to take effect.

Step 5: Validate Server-Level Resource Allocation

  • Open Task Manager > Performance tab on Windows Server 2025 to confirm CPU and memory aren’t maxed at the OS level.
  • Cross-reference with SQL Server’s max server memory setting under Server Properties > Memory to ensure it isn’t artificially constraining available resources.

Alternative or Verification Steps

  • After applying changes, run a load test using ostress.exe or a simple loop of concurrent connections to confirm Error 10930 no longer triggers under peak conditions.
  • If the error persists, check Windows Event Viewer (Applications and Services Logs > MSSQLSERVER) for correlating Resource Governor classifier function errors, and consider temporarily disabling Resource Governor with ALTER RESOURCE GOVERNOR DISABLE; to isolate whether it is the root cause.

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

Troubleshooting Guide: Error 10931 – Resource Pool Bound to Database

Why This Error Happens

This error occurs because SQL Server 2025’s Resource Governor allows databases to be explicitly bound to a specific resource pool for workload management purposes, typically through database-scoped configuration settings. When an administrator attempts to drop a resource pool that still has one or more databases mapped to it via this binding, SQL Server blocks the operation to prevent orphaned configurations or unexpected resource allocation behavior. The binding must be explicitly removed or reset to the default pool before the resource pool object itself can be deleted from the Resource Governor configuration.

Step-by-Step Resolution Guide

Step 1: Identify Which Databases Are Bound to the Resource Pool

  • Open SQL Server Management Studio (SSMS) and connect to your SQL Server 2025 instance.
  • Run the following query to find bound databases:
  SELECT database_id, DB_NAME(database_id) AS DatabaseName, primary_pool_id, secondary_pool_id
  FROM sys.resource_governor_resource_pools AS rp
  INNER JOIN sys.resource_governor_configuration AS rgc ON rp.pool_id = rgc.classifier_function_id;
  • Alternatively, check sys.databases for the resource_pool_id column associated with each database.

Step 2: Remove the Resource Pool Binding from the Database

  • Use the ALTER DATABASE command with the SET option to reset the resource pool binding to default (NULL):
  ALTER DATABASE [YourDatabaseName]
  SET RESOURCE_GOVERNOR RESOURCE_POOL = NULL;
  • If you are using secondary pool bindings (common in multi-tenant scenarios), ensure you clear both primary and secondary pool references.
  • Repeat this step for every database identified in Step 1 that references the pool you intend to drop.

Step 3: Reconfigure Resource Governor

  • After unbinding the databases, force the Resource Governor to apply the new configuration changes:
  ALTER RESOURCE GOVERNOR RECONFIGURE;
  • This step is mandatory; without it, the metadata changes remain pending and the system may still report the pool as “in use.”

Step 4: Drop the Resource Pool

  • Once bindings are cleared and the configuration is reconfigured, attempt to drop the pool again:
  DROP RESOURCE POOL [YourPoolName];
  • Follow this immediately with another reconfigure command to finalize the removal:
  ALTER RESOURCE GOVERNOR RECONFIGURE;

Alternative or Verification Steps

  • Verification: Query sys.resource_governor_resource_pools again to confirm the pool no longer appears in the list, and check sys.databases to ensure the resource_pool_id for previously bound databases now shows NULL or the default pool ID (1).
  • Alternative: If the DROP command still fails due to a cached execution context, restart the SQL Server (MSSQLSERVER) service via the Services management console (services.msc) on Windows Server 2025 to clear any lingering session locks, then retry the drop command.

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

Troubleshooting Guide: SQL Server Error 10929 – Resource Governor Memory Limit

Why This Error Happens

Error 10929 occurs when the Resource Governor in SQL Server 2025 enforces a workgroup memory limit that has been configured too restrictively for the current workload. This typically happens when MAX_MEMORY_PERCENT or REQUEST_MAX_MEMORY_GRANT_PERCENT settings in a Resource Pool are set too low relative to actual query memory demands. The error can also surface after a server migration or configuration import where Resource Governor pool settings were not recalibrated for the new hardware’s available memory.

Step-by-Step Resolution Guide

Step 1: Identify the Offending Resource Pool

  • Run the following query to find the Resource ID referenced in the error message:
  • SELECT * FROM sys.dm_resource_governor_resource_pools WHERE pool_id = <Resource ID from error>;
  • Note the min_memory_percent and max_memory_percent values currently assigned.
  • Cross-reference this with sys.resource_governor_resource_pools to see the persisted configuration versus the in-memory runtime state.

Step 2: Recalculate Memory Allocation Across Pools

  • Ensure the sum of MIN_MEMORY_PERCENT across all resource pools does not exceed 100%.
  • On Windows Server 2025/Windows 11 hosts, confirm the SQL Server instance’s “Max server memory” setting isn’t artificially capping the pool below its configured minimum guarantee.
  • Adjust the pool using T-SQL:
  • ALTER RESOURCE POOL [PoolName] WITH (MIN_MEMORY_PERCENT = 0, MAX_MEMORY_PERCENT = 100);
  • ALTER RESOURCE GOVERNOR RECONFIGURE;

Step 3: Review Workload Group Settings

  • Check REQUEST_MAX_MEMORY_GRANT_PERCENT on the Workload Group tied to the pool, as an overly aggressive single-query grant request can trigger this even with correct pool-level settings.
  • Lower this value if a single runaway query or reporting job is monopolizing the pool’s guarantee.
  • Use sp_configure 'show advanced options', 1; followed by RECONFIGURE; to ensure advanced settings are visible before altering memory options.

Step 4: Restart the Resource Governor Service Context

  • Execute ALTER RESOURCE GOVERNOR RECONFIGURE; to apply changes without a full service restart.
  • If the error persists, restart the SQL Server service via Windows Services (services.msc) or net stop MSSQLSERVER && net start MSSQLSERVER to clear any cached memory broker states.

Alternative or Verification Steps

  • Verify the fix by querying sys.dm_resource_governor_resource_pools again and confirming the target_memory_kb aligns with the min_memory_percent without throwing allocation errors during peak load.
  • If the issue persists despite configuration changes, disable Resource Governor temporarily using ALTER RESOURCE GOVERNOR DISABLE; to confirm the error is isolated to governor settings rather than physical RAM exhaustion on the Windows Server 2025 host.

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

Troubleshooting Guide: SQL Server Error 10927

Why This Error Happens

Error 10927 typically occurs when a specified configuration value — such as a resource governor setting, memory allocation parameter, or a database/object property — falls outside the acceptable range or conflicts with an existing system constraint. This often happens due to misconfigured server-level settings, insufficient permissions to modify the target resource, or corrupted metadata in system catalog views. In Windows Server 2025 / Windows 11 environments, this can also surface after in-place upgrades where legacy configuration values are incompatible with SQL Server 2025’s updated engine defaults.

Step-by-Step Resolution Guide

Step 1: Identify the Exact Value Causing the Conflict

  • Open SQL Server Management Studio (SSMS) and reproduce the error to capture the full message, including the specific value referenced in place of %.*ls.
  • Check the SQL Server Error Log located at C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Log\ERRORLOG for additional context around the timestamp of the failure.
  • Cross-reference the value against Microsoft’s documented valid ranges for the specific command or property being set (e.g., sp_configure, ALTER RESOURCE GOVERNOR, or ALTER DATABASE).

Step 2: Validate and Correct the Configuration Value

  • Run EXEC sp_configure 'show advanced options', 1; RECONFIGURE; to expose advanced settings if the error relates to server configuration.
  • Compare current values using EXEC sp_configure; and adjust the offending parameter to a supported value using EXEC sp_configure 'parameter_name', valid_value; RECONFIGURE WITH OVERRIDE;.
  • If the error relates to a database-level object (e.g., filegroup, schema, or partition function), verify the object exists and is spelled correctly by querying sys.objects or sys.database_files.

Step 3: Check Permissions and Ownership

  • Confirm the executing account has the ALTER SETTINGS or CONTROL SERVER permission required to modify the target value.
  • In Windows Server 2025, verify the SQL Server service account has appropriate rights in Local Security Policy (secpol.msc) under User Rights Assignment.
  • Run SELECT * FROM fn_my_permissions(NULL, 'SERVER'); to confirm the current login has sufficient privilege scope.

Step 4: Repair or Rebuild Corrupted Metadata (If Applicable)

  • Run DBCC CHECKDB('YourDatabaseName') WITH NO_INFOMSGS, ALL_ERRORMSGS; to rule out system catalog corruption.
  • If corruption is found, restore from a known-good backup rather than using REPAIR_ALLOW_DATA_LOSS as a first resort.
  • Restart the SQL Server service via Services.msc or net stop MSSQLSERVER && net start MSSQLSERVER after applying fixes.

Alternative or Verification Steps

  • Re-run the original command or operation that triggered Error 10927 and confirm it completes without returning the value-related error message.
  • If the issue persists, use SQL Server Configuration Manager to reset the affected setting to its default value, then reapply your custom configuration incrementally to isolate the specific invalid parameter.

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

Why This Error Happens

Error 10928 occurs when a specific resource governor limit—such as concurrent sessions, worker threads, or database size—has hit the maximum threshold defined for that SQL Server edition or Azure SQL tier. This is most common with SQL Server Express Edition (which caps database size at 10GB) or when a workload exceeds the configured MAXDOP, worker thread, or session limits in SQL Server 2025. It can also surface in elastic pool/tiered configurations where DTU or vCore ceilings restrict simultaneous connections.

Step-by-Step Resolution Guide

Step 1: Identify the Exact Resource Hitting the Limit

  • Run SELECT * FROM sys.dm_os_performance_counters WHERE counter_name LIKE '%Data File(s) Size%'; to check current database size.
  • Cross-reference the Resource ID number from the error message against Microsoft’s Resource Governor resource ID table (e.g., Resource ID 2 = database size, Resource ID 1 = worker threads).

Step 2: Check Your SQL Server Edition and Licensing Tier

  • Open SQL Server Management Studio (SSMS) and run SELECT SERVERPROPERTY('Edition'), SERVERPROPERTY('EngineEdition');.
  • If running Express Edition, confirm the 10GB-per-database cap using EXEC sp_spaceused;.
  • For Standard/Enterprise editions, verify no artificial cap was set via Resource Governor pools (sys.resource_governor_resource_pools).

Step 3: Adjust Resource Governor or Database Configuration

  • Navigate to SQL Server Management Studio > Management > Resource Governor and inspect the resource pool tied to your workload.
  • Increase MAX_MEMORY_PERCENT, MAX_CPU_PERCENT, or worker thread allocation using:
  ALTER RESOURCE POOL [PoolName] WITH (MAX_MEMORY_PERCENT = 50);
  ALTER RESOURCE GOVERNOR RECONFIGURE;
  • If the limit is database size on Express Edition, migrate to Standard Edition or offload data via sp_detach_db / sp_attach_db to a non-restricted instance.

Step 4: Free Up Space or Reduce Concurrent Load (If Size-Related)

  • Run DBCC SHRINKFILE cautiously on log/data files after a full backup.
  • Archive or purge old data from large tables and rebuild indexes with ALTER INDEX ALL ON [TableName] REBUILD; to reclaim space.

Step 5: Restart SQL Server Service to Apply Changes

  • Open Services.msc on Windows Server 2025 / Windows 11, locate SQL Server (MSSQLSERVER), and restart it.
  • Alternatively, use PowerShell: Restart-Service -Name 'MSSQLSERVER' -Force.

Alternative or Verification Steps

  • After applying changes, re-run the failing query or workload and monitor sys.dm_exec_requests to confirm no new 10928 errors appear in the SQL Server Error Log (EXEC sp_readerrorlog 0, 1, '10928';).
  • If the issue persists, consider upgrading to a higher SQL Server edition or Azure SQL Database service tier that supports higher resource ceilings.

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

Why This Error Happens

Error 10925 occurs when the CPU affinity range specified in the -x startup parameter or the ALTER SERVER CONFIGURATION SET PROCESS AFFINITY statement contains a duplicate CPU ID or overlapping range across multiple affinity pools. SQL Server 2025 validates that each processor is assigned to only one affinity mask or pool at startup, and if the same logical processor appears twice in the configuration list, the engine rejects the pool definition to prevent scheduler conflicts. This typically results from manual edits to the registry, a misconfigured startup parameter, or an automated deployment script that generated overlapping CPU ranges.

Step-by-Step Resolution Guide

Step 1: Identify the Conflicting Affinity Range

  • Open SQL Server Configuration Manager on Windows Server 2025 / Windows 11.
  • Navigate to SQL Server Services > right-click your instance > Properties > Startup Parameters tab.
  • Look for the -x or affinity-related parameter and note any overlapping CPU ranges (e.g., 0-7 and 6-15 both referencing CPUs 6 and 7).

Step 2: Correct the Affinity Mask via T-SQL

  • Connect to the instance using SQL Server Management Studio (SSMS) or sqlcmd.
  • Run the following to inspect current pool configuration:
  SELECT * FROM sys.dm_os_nodes;
  SELECT * FROM sys.resource_governor_resource_pool_affinity;
  • Reset affinity cleanly using:
  ALTER SERVER CONFIGURATION SET PROCESS AFFINITY CPU = AUTO;
  • If using Resource Governor pools, redefine each pool individually without overlapping ranges:
  ALTER RESOURCE POOL PoolA WITH (AFFINITY SCHEDULER = (0 TO 7));
  ALTER RESOURCE POOL PoolB WITH (AFFINITY SCHEDULER = (8 TO 15));

Step 3: Audit the Registry for Legacy Affinity Settings

  • Open regedit and navigate to:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQLServer\Parameters
  • Check each SQLArgn value for duplicate -x entries or conflicting affinity masks.
  • Remove or correct any duplicate parameter strings, then save and close the registry editor.

Step 4: Restart the SQL Server Service

  • In SQL Server Configuration Manager, right-click the instance and select Restart.
  • Alternatively, from an elevated PowerShell prompt:
  Restart-Service -Name 'MSSQLSERVER' -Force
  • Monitor the SQL Server Error Log during startup to confirm Error 10925 no longer appears.

Alternative or Verification Steps

  • Verify the fix by querying sys.dm_os_schedulers and confirming each scheduler_id maps to a unique CPU with no duplicate cpu_id entries across pools.
  • If the error persists, reset the entire affinity configuration to default (AUTO) and rebuild custom Resource Governor pools one at a time, testing after each addition to isolate the conflicting range.

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

Troubleshooting Guide: SQL Server Error 10926 – Resource Range Not Available to Current Instance

Why This Error Happens

Error 10926 occurs when a database command (typically related to CPU affinity, filegroup, or online index rebuild operations) references a resource range—such as CPU IDs, partition numbers, or container IDs—that exceeds what is physically or logically available to the current SQL Server instance. This commonly happens after a VM or physical host has been reconfigured with fewer CPUs/NUMA nodes than the instance was originally provisioned for, or when a configuration script written for one server is applied to another with different hardware limits. It can also surface after a failed scale-down operation in Windows Server 2025 Hyper-V environments where the guest OS did not fully release stale hardware mapping.

Step-by-Step Resolution Guide

Step 1: Identify the Exact Resource Range Being Requested

  • Check the full error message in SQL Server Error Log (Management Studio > Management > SQL Server Logs) to see the specific %S_MSG values and the maximum allowed number.
  • Run SELECT cpu_id, scheduler_id FROM sys.dm_os_schedulers WHERE status = 'VISIBLE ONLINE'; to confirm how many CPUs SQL Server currently recognizes.
  • Cross-reference this against Task Manager > Performance tab or Get-WmiObject Win32_Processor in PowerShell to see actual host-provisioned CPUs.

Step 2: Correct the Affinity Mask or Configuration Script

  • If using ALTER SERVER CONFIGURATION SET PROCESS AFFINITY CPU=, revise the CPU list to only include valid CPU IDs (0 through the max reported in the error).
  • Example fix: ALTER SERVER CONFIGURATION SET PROCESS AFFINITY CPU = AUTO; to reset to default before reapplying a corrected manual range.
  • If the issue involves partition numbers in a partitioned table or index rebuild, verify the partition scheme in SSMS under Database > Storage > Partition Schemes and adjust ALTER INDEX or ALTER PARTITION commands to stay within the valid boundary.

Step 3: Validate Hardware/VM Resource Allocation

  • In Hyper-V Manager on Windows Server 2025, open Settings for the VM and confirm the Processor count matches what you expect SQL Server to use.
  • If running on Windows 11 (Developer/Test instance), check Settings > System > About > Device Specifications for actual logical processor count.
  • Restart the SQL Server service after adjusting VM or host CPU allocation to force SQL Server to re-enumerate available resources.

Step 4: Restart SQL Server Service to Clear Stale State

  • Open services.msc, locate SQL Server (MSSQLSERVER) or named instance, and restart the service.
  • Alternatively, run in an elevated PowerShell session: Restart-Service -Name 'MSSQLSERVER' -Force.
  • Confirm in SQL Server Error Log that the instance starts cleanly with no residual 10926 errors.

Step 5: Reapply Configuration with Correct Range

  • Re-run the original command (CPU affinity, filegroup assignment, or partition operation) using only values confirmed valid in Step 1.
  • Document the corrected script and store it in your deployment repository to prevent recurrence on future rebuilds or clones.

Alternative or Verification Steps

  • Run DBCC CHECKDB and sp_configure 'show advanced options', 1; RECONFIGURE; followed by sp_configure to confirm current instance-wide settings reflect the corrected resource range.
  • If the error persists after hardware validation, consider rebuilding the affected database object (index, filegroup, or partition function) from a known-good script template that dynamically pulls sys.dm_os_schedulers values instead of hardcoding CPU/partition numbers.

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

Troubleshooting Guide: SQL Server Error 10924 — Invalid Pool Affinity Range

Why This Error Happens

Error 10924 occurs when SQL Server’s affinity configuration (either CPU affinity or I/O affinity settings for a Resource Governor pool) is defined with a lower boundary value that is equal to or greater than the upper boundary value. This typically results from a manual misconfiguration in sp_configure, a malformed ALTER RESOURCE GOVERNOR statement, or a mismatch between the number of logical processors available on the host and the affinity mask/range specified in the pool definition. It can also surface after a hardware change (such as reducing vCPUs on a Windows Server 2025 VM) that invalidates a previously valid affinity range.

Step-by-Step Resolution Guide

Step 1: Identify the Faulty Resource Pool Configuration

  • Connect to the instance via SQLCMD or SSMS and query current pool settings:
  • SELECT * FROM sys.resource_governor_resource_pools;
  • SELECT * FROM sys.dm_os_schedulers WHERE scheduler_id < 1048576;
  • Note the pool name throwing the error and record the current min_affinity and max_affinity values.

Step 2: Correct the Affinity Range Values

  • Open a new query window and issue a corrected ALTER RESOURCE GOVERNOR statement, ensuring the lower bound is strictly less than the upper bound:
  • ALTER RESOURCE POOL [YourPoolName] WITH (AFFINITY SCHEDULER = (0 TO 3));
  • Avoid reversed ranges like (4 TO 2) — always list the smaller scheduler number first.
  • Apply the change with:
  • ALTER RESOURCE GOVERNOR RECONFIGURE;

Step 3: Validate Against Actual CPU Topology

  • Check the real number of logical processors available to Windows Server 2025 / Windows 11:
  • Open PowerShell and run Get-CimInstance Win32_Processor | Select-Object NumberOfLogicalProcessors
  • Ensure the affinity range you configured does not exceed this physical/virtual core count.
  • If the VM or host was recently resized (fewer vCPUs assigned), update the pool’s upper bound to match the new maximum scheduler ID.

Step 4: Reset to Default if Range Remains Ambiguous

  • If you cannot determine the correct custom range, revert the pool to default affinity behavior:
  • ALTER RESOURCE POOL [YourPoolName] WITH (AFFINITY SCHEDULER = AUTO);
  • ALTER RESOURCE GOVERNOR RECONFIGURE;
  • Restart the SQL Server service via services.msc or Restart-Service MSSQLSERVER in PowerShell to ensure the Resource Governor fully reinitializes.

Alternative or Verification Steps

  • Re-run SELECT * FROM sys.resource_governor_resource_pools; after reconfiguration to confirm min_affinity is now numerically lower than max_affinity for every pool.
  • Check the SQL Server Error Log (via xp_readerrorlog or SSMS > Management > SQL Server Logs) to confirm Error 10924 no longer appears after the next service restart or reconfiguration event.

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

Troubleshooting Guide: SQL Server Error 10922

Why This Error Happens

Error 10922 (%ls failed. Rerun the statement.) typically occurs when SQL Server encounters a transient failure while executing a DDL or metadata operation, often due to a schema lock conflict, insufficient permissions on system catalog views, or a brief I/O interruption on the underlying storage. This is commonly seen during concurrent index rebuilds, statistics updates, or when the Database Engine cannot immediately acquire the required internal resources to complete the statement. In rare cases, it can also indicate underlying corruption in system metadata or a failing storage subsystem that intermittently delays write confirmations.

Step-by-Step Resolution Guide

Step 1: Simply Rerun the Statement

  • As the error message suggests, this is often a transient issue; execute the exact same query again.
  • Check SQL Server Management Studio (SSMS) Activity Monitor for blocking sessions before rerunning.
  • If using a script, wrap the statement in a retry loop with a WAITFOR DELAY '00:00:05' before retrying.

Step 2: Check for Blocking and Schema Locks

  • Run sp_who2 or query sys.dm_exec_requests to identify sessions holding schema locks (Sch-M) on the affected object.
  • Terminate long-running blocking transactions using KILL <session_id> if safe to do so.
  • Ensure no concurrent ALTER INDEX, CREATE INDEX, or UPDATE STATISTICS jobs are running on the same table.

Step 3: Verify Database and Disk Integrity

  • Run DBCC CHECKDB('YourDatabaseName') WITH NO_INFOMSGS, ALL_ERRORMSGS; to rule out corruption.
  • Check Windows Event Viewer (Windows Logs > System) for Disk or NTFS warnings correlating with the SQL error timestamp.
  • Confirm the storage volume hosting the .mdf/.ldf files has sufficient free space and is not nearing capacity.

Step 4: Validate SQL Server Service Account Permissions

  • Open Services.msc on Windows Server 2025 and confirm the SQL Server service account has “Log on as a service” rights.
  • Verify the account has db_owner or appropriate ALTER permissions on the target database via SSMS > Security > Logins.
  • Restart the SQL Server service (net stop MSSQLSERVER && net start MSSQLSERVER) if permissions were recently modified.

Step 5: Update SQL Server Cumulative Updates

  • Navigate to Microsoft Update Catalog and check the installed build version via SELECT @@VERSION;.
  • Apply the latest Cumulative Update (CU) for SQL Server 2025, as this error has known fixes related to metadata handling in early builds.
  • Reboot the Windows Server 2025 instance after patching to ensure services reload cleanly.

Alternative or Verification Steps

  • Re-execute the original failing query and confirm it completes without the 10922 error; cross-check the SQL Server Error Log (Management > SQL Server Logs in SSMS) for recurrence.
  • If the error persists, run the statement during an off-peak maintenance window to rule out resource contention, or failover to a secondary replica (if using Always On Availability Groups) to isolate whether the issue is node-specific.

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

Troubleshooting Guide: SQL Server Error 10923 – Resource Governor Not Available

Why This Error Happens

This error occurs because Resource Governor is an Enterprise-tier feature, and your instance of SQL Server 2025 is running on an edition that does not support it (such as Standard, Web, or Express edition). SQL Server still allows you to script and store Resource Governor metadata (via DDL statements like CREATE RESOURCE POOL or ALTER RESOURCE GOVERNOR), but it blocks the actual runtime enforcement of those policies since the underlying engine component is licensed out. This commonly surfaces after a migration, a side-grade from Standard to a different edition, or when restoring a database/script originally created on an Enterprise instance.

Step-by-Step Resolution Guide

Step 1: Verify Your Current SQL Server Edition

  • Open SQL Server Management Studio (SSMS) and connect to the instance throwing the error.
  • Run the following query to confirm the edition:
  SELECT SERVERPROPERTY('Edition') AS Edition, SERVERPROPERTY('ProductVersion') AS Version;
  • If the result shows “Standard Edition,” “Web Edition,” or “Express Edition,” this confirms Resource Governor cannot be enabled on this instance.

Step 2: Review and Halt Resource Governor Configuration Attempts

  • Check any deployment scripts, DACPACs, or T-SQL automation jobs that call ALTER RESOURCE GOVERNOR RECONFIGURE.
  • Remove or comment out these calls if the target server is not Enterprise/Developer edition, since metadata changes will succeed but reconfiguration will continue to throw Error 10923.
  • Inspect SQL Agent Job steps and any CI/CD release pipelines (Azure DevOps, Octopus) for hardcoded Resource Governor commands.

Step 3: Upgrade the Edition (If Resource Governor Is Required)

  • If workload management via Resource Governor is a business requirement, upgrade the instance to SQL Server 2025 Enterprise or Developer edition.
  • Use the SQL Server Installation Center: navigate to Maintenance > Edition Upgrade and supply a valid Enterprise/Developer product key.
  • Restart the SQL Server service (services.msc on Windows Server 2025/Windows 11) after the edition upgrade completes:
  Restart-Service -Name 'MSSQLSERVER'

Step 4: Clean Up Orphaned Resource Governor Metadata (Optional)

  • If you are staying on a non-Enterprise edition, disable and reset any stored Resource Governor configuration to prevent confusion in future deployments.
  • Run the following to reset pools and groups to default:
  ALTER RESOURCE GOVERNOR DISABLE;
  DROP WORKLOAD GROUP IF EXISTS [YourCustomGroup];
  DROP RESOURCE POOL IF EXISTS [YourCustomPool];
  ALTER RESOURCE GOVERNOR RECONFIGURE;
  • Note: the final RECONFIGURE will still return informational Error 10923 — this is expected and harmless once pools are cleaned up.

Alternative or Verification Steps

  • Verify the fix by checking SQL Server Error Log (via EXEC sp_readerrorlog; or Event Viewer under Windows Logs > Application) to confirm Error 10923 no longer appears after your next deployment or reconfiguration attempt.
  • If upgrading the edition is not feasible, use Database-Scoped Configurations or Query Store hints as an alternative lightweight workload management strategy, since these features remain available on Standard edition.

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

Troubleshooting Guide: Error 10920 – Cannot Alter/Drop Function Used as Resource Governor Classifier

Why This Error Happens

This error occurs because SQL Server 2025 prevents modification or deletion of a user-defined function (UDF) that is currently registered as the active Resource Governor classifier function. The Resource Governor subsystem locks the schema binding of this function to ensure session classification logic remains consistent and available for every incoming connection. Attempting to run ALTER FUNCTION or DROP FUNCTION on this object fails because the engine detects a dependency between the function and the sys.resource_governor_configuration metadata, which cannot be broken without first disassociating the classifier role.

Step-by-Step Resolution Guide

Step 1: Identify the Current Classifier Function

  • Open a new query window in SQL Server Management Studio (SSMS) connected to the target instance on Windows Server 2025 or Windows 11.
  • Run the following query to confirm which function is currently bound as the classifier:
  SELECT classifier_function_id, OBJECT_NAME(classifier_function_id) AS FunctionName
  FROM sys.resource_governor_configuration;
  • Note the schema and function name returned (e.g., dbo.fnClassifier).

Step 2: Disassociate the Classifier Function from Resource Governor

  • Execute the following T-SQL to set the classifier function to NULL, releasing the lock on the UDF:
  ALTER RESOURCE GOVERNOR WITH (CLASSIFIER_FUNCTION = NULL);
  ALTER RESOURCE GOVERNOR RECONFIGURE;
  • This step temporarily disables custom session classification, so all new connections will route to the default workload group until a new classifier is assigned.

Step 3: Modify or Drop the User-Defined Function

  • With the classifier binding removed, run your intended ALTER FUNCTION or DROP FUNCTION statement against the UDF (e.g., dbo.fnClassifier).
  • If you plan to recreate the function with new logic, ensure the SCHEMABINDING option and correct data types remain consistent with Resource Governor requirements (must return sysname).
  • Save the updated function script to a local path (e.g., C:\SQLScripts\fnClassifier_v2.sql) for version control.

Step 4: Re-Bind the Updated Function as Classifier

  • Once the function has been successfully altered or recreated, reassign it as the active classifier:
  ALTER RESOURCE GOVERNOR WITH (CLASSIFIER_FUNCTION = dbo.fnClassifier);
  ALTER RESOURCE GOVERNOR RECONFIGURE;
  • Confirm no syntax errors are returned and the reconfigure command completes successfully.

Alternative or Verification Steps

  • Verify the fix by querying sys.resource_governor_configuration again to ensure classifier_function_id matches the updated function’s object ID via OBJECT_ID('dbo.fnClassifier').
  • If the error persists, check for open sessions still referencing the old execution plan by running DBCC FREEPROCCACHE (in a test environment only) to clear cached classifier logic before retrying the ALTER statement.

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

Troubleshooting Guide: SQL Server Error 10921 — Object Cannot Be Moved

Why This Error Happens

Error 10921 occurs when SQL Server 2025 attempts to transfer an object (such as a table, index, or partition) between schemas or filegroups, but the target schema or filegroup does not logically contain the required dependent structures. This is commonly triggered when an ALTER SCHEMA ... TRANSFER statement is executed on an object that has dependencies—like indexed views, foreign key constraints, or partitioned indexes—still bound to the original schema. It can also occur if the object is a system-versioned temporal table or a memory-optimized table, which have strict rules preventing cross-schema or cross-filegroup movement without first dropping the dependency chain.

Step-by-Step Resolution Guide

Step 1: Identify the Dependency Chain

  • Run sys.sql_expression_dependencies to check if the object has bound views, functions, or constraints referencing the original schema.
  • Use the following query to list blocking dependencies:
  SELECT * FROM sys.sql_expression_dependencies 
  WHERE referenced_entity_name = 'YourObjectName';
  • Check if the table is a system-versioned temporal table using SELECT temporal_type FROM sys.tables WHERE name = 'YourObjectName';. A value of 2 indicates history tracking, which blocks simple transfers.

Step 2: Disable Temporal Versioning (If Applicable)

  • If the object is a temporal table, you must turn off system versioning before moving it.
  • Execute: ALTER TABLE YourSchema.YourTable SET (SYSTEM_VERSIONING = OFF);
  • Perform the schema or filegroup transfer now that the history link is severed.
  • Re-enable versioning post-move using ALTER TABLE YourSchema.YourTable SET (SYSTEM_VERSIONING = ON (HISTORY_TABLE = YourSchema.YourHistoryTable));

Step 3: Drop and Recreate Blocking Indexes

  • If the error relates to a partitioned index being moved independently of its base table, drop the specific index.
  • Navigate to SQL Server Management Studio (SSMS) and expand the Indexes node under the specific table in Object Explorer.
  • Run DROP INDEX YourIndexName ON YourSchema.YourTable; to remove the conflicting structure.
  • Retry the ALTER SCHEMA or ALTER TABLE command to move the object to the new schema/filegroup.

Step 4: Verify File Group Permissions

  • Ensure the SQL Server service account has ALTER permission on both the source and destination schemas.
  • Check permissions via SELECT * FROM fn_my_permissions('YourSchema', 'SCHEMA'); to confirm TAKE OWNERSHIP and ALTER rights exist.
  • Grant missing permissions using GRANT ALTER ON SCHEMA::YourSchema TO [YourServiceAccount];.

Alternative or Verification Steps

  • Verify the fix by querying sys.objects joined with sys.schemas to confirm the object now resides in the correct target schema (e.g., SELECT s.name, o.name FROM sys.objects o JOIN sys.schemas s ON o.schema_id = s.schema_id WHERE o.name = 'YourObjectName';).
  • If the error persists specifically with Memory-Optimized tables, the only workaround is to export the data using bcp or SSIS, drop the object entirely, and recreate it manually within the target schema, as native “ALTER” moves are unsupported for that object type.

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

Troubleshooting Guide: SQL Server Error 10919 – Resource Governor Configuration Read Failure

Why This Error Happens

This error occurs when SQL Server 2025 fails to read the Resource Governor metadata stored in the master database, typically during startup, ALTER RESOURCE GOVERNOR RECONFIGURE, or when querying sys.resource_governor_configuration. The most common root causes are corruption in the master database’s system catalog, insufficient permissions on the Resource Governor DDL/metadata objects, or an incomplete/interrupted upgrade that left the Resource Governor configuration tables in an inconsistent state. In rare cases, this is triggered by manual edits to system tables or a failed in-place upgrade from an older SQL Server version to SQL Server 2025.

Step-by-Step Resolution Guide

Step 1: Verify Master Database Integrity

  • Open SQL Server Management Studio (SSMS) or sqlcmd and connect to the instance using an account with sysadmin privileges.
  • Run DBCC CHECKDB ('master') WITH NO_INFOMSGS, ALL_ERRORMSGS; to check for corruption in system pages.
  • Review the output for allocation errors or consistency errors specifically referencing Resource Governor internal tables (e.g., sys.sysrsrvgovcfg).
  • If corruption is found, restore master from a known-good backup taken before the error started occurring.

Step 2: Validate Permissions on Resource Governor Objects

  • Confirm the login attempting the operation has CONTROL SERVER or ALTER ANY RESOURCE GOVERNOR CONFIGURATION permission.
  • Run the following query to check current permissions:
SELECT * FROM fn_my_permissions(NULL, 'SERVER');
  • If permissions are missing, grant them explicitly:
GRANT ALTER ANY RESOURCE GOVERNOR CONFIGURATION TO [YourLogin];
  • Restart the SQL Server service via services.msc or Restart-Service MSSQLSERVER in PowerShell on Windows Server 2025 for permission changes to take effect.

Step 3: Reset Resource Governor to Default Configuration

  • Open a new query window in SSMS with elevated/sysadmin rights.
  • Execute the following to disable and reset Resource Governor to its default state:
ALTER RESOURCE GOVERNOR DISABLE;
ALTER RESOURCE GOVERNOR RESET STATISTICS;
ALTER RESOURCE GOVERNOR RECONFIGURE;
  • If the RECONFIGURE statement still throws Error 10919, proceed to rebuild the configuration manually by dropping custom workload groups and pools, then recreating them.

Step 4: Check for Incomplete Upgrade Artifacts

  • Navigate to C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Log\ (adjust version folder for SQL Server 2025) and open the latest ERRORLOG file.
  • Search for entries related to “Resource Governor” or “upgrade script” failures that occurred during installation.
  • If an upgrade failure is detected, run the SQL Server Setup repair option from Control Panel > Programs > Microsoft SQL Server 2025 > Repair.
  • After repair completes, restart the SQL Server service and re-run ALTER RESOURCE GOVERNOR RECONFIGURE;.

Step 5: Rebuild System Databases (Last Resort)

  • If corruption persists and no valid backup exists, use the SQL Server 2025 installation media to run setup.exe /ACTION=REBUILDDATABASE to rebuild the master, model, and msdb databases.
  • Reapply all server-level configurations, logins, and linked servers manually after the rebuild since this action resets master to default.
  • Restore user databases separately, as they are not affected by the master rebuild.

Alternative or Verification Steps

  • To verify the fix, run SELECT * FROM sys.resource_governor_configuration; and confirm it returns data without errors, then check the SQL Server Error Log for the absence of Event ID 10919 after a service restart.
  • As an alternative, if the issue is isolated to a specific workload group or pool, export the current Resource Governor DDL script (if accessible), fully disable Resource Governor, drop all custom pools/groups, and reapply the script incrementally to isolate the corrupted object.

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

Troubleshooting Guide: Error 10917 – ALTER WORKLOAD GROUP Syntax Failure

Why This Error Happens

This error occurs when an ALTER WORKLOAD GROUP statement is executed without specifying the required WITH or USING clause, which SQL Server 2025 needs to determine which properties or resource pool bindings to modify. In most cases, this is caused by legacy T-SQL scripts carried over from earlier SQL Server versions that used a different Resource Governor syntax structure. It can also happen when automated deployment scripts or DBA tools generate incomplete T-SQL due to a misconfigured template or a copy-paste error that strips out the clause.

Step-by-Step Resolution Guide

Step 1: Identify the Offending Script or Query

  • Open SQL Server Management Studio (SSMS) or Azure Data Studio and locate the exact ALTER WORKLOAD GROUP statement that triggered Error 10917.
  • Check the SQL Server Error Log (via EXEC sp_readerrorlog or Event Viewer under Applications and Services Logs > MSSQLSERVER) to confirm the timestamp and session ID that raised the error.
  • Cross-reference any deployment or migration scripts (.sql files) stored in your release pipeline (e.g., Azure DevOps, Jenkins) for the same syntax pattern.

Step 2: Correct the T-SQL Syntax

  • Rewrite the statement to include either the WITH clause (for modifying group properties) or USING clause (for reassigning a resource pool).
  • Example of a corrected statement:
  ALTER WORKLOAD GROUP [groupAdhoc]
  WITH (IMPORTANCE = MEDIUM)
  USING [poolAdhoc];
  • Ensure the resource pool referenced in the USING clause already exists; verify with:
  SELECT name FROM sys.resource_governor_resource_pools;

Step 3: Validate Resource Governor Configuration

  • Run SELECT * FROM sys.resource_governor_workload_groups; to confirm the workload group exists and view its current configuration.
  • If the workload group is missing entirely, create it first using CREATE WORKLOAD GROUP before attempting any ALTER operation.
  • Reload the Resource Governor configuration after making changes:
  ALTER RESOURCE GOVERNOR RECONFIGURE;

Step 4: Check for Tool or Script Generation Issues

  • If the statement was auto-generated by a third-party monitoring or provisioning tool, check the tool’s version compatibility with SQL Server 2025, as syntax requirements may have changed from SQL Server 2022.
  • Update the tool to the latest patch level or manually override the generated script with the corrected syntax from Step 2.

Alternative or Verification Steps

  • Verify the fix by re-running the corrected ALTER WORKLOAD GROUP statement and confirming no errors appear in the SQL Server Error Log or SSMS output pane.
  • As an alternative, use the Resource Governor GUI in SSMS (under Management > Resource Governor) to modify workload group properties visually, which automatically generates syntactically correct T-SQL and avoids manual clause omission.

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

Troubleshooting Guide: SQL Server Error 10918

Why This Error Happens

Error 10918 occurs when SQL Server attempts to create an object (such as a schema, type, assembly, or other named entity) that already exists in the target database with the exact same name. This typically happens due to a failed or partially completed deployment script that was re-run without proper cleanup, duplicate migration scripts executing against the same database, or a previous transaction that committed the object creation but failed afterward during rollback logging. In some cases, this is also triggered by DACPAC/BACPAC deployments or replication scripts that don’t account for existing objects using IF NOT EXISTS checks.

Step-by-Step Resolution Guide

Step 1: Identify the Conflicting Object

  • Review the full error message to extract the exact object name referenced in '%.*ls'.
  • Run a query against system catalog views to confirm existence, for example: SELECT * FROM sys.objects WHERE name = 'YourObjectName'; or SELECT * FROM sys.schemas WHERE name = 'YourSchemaName';.
  • Check sys.types, sys.assemblies, or sys.databases depending on the object type referenced in the error.

Step 2: Review the Deployment or Migration Script

  • Open the SQL script or DACPAC deployment log that triggered the error.
  • Look for CREATE SCHEMA, CREATE TYPE, CREATE ASSEMBLY, or CREATE DATABASE statements missing a conditional existence check.
  • Add a guard clause such as: IF NOT EXISTS (SELECT * FROM sys.schemas WHERE name = 'SchemaName') BEGIN CREATE SCHEMA SchemaName; END.

Step 3: Drop or Rename the Conflicting Object (If Safe)

  • Confirm the existing object is not actively referenced by production code, views, or stored procedures using sys.sql_expression_dependencies.
  • If safe, run DROP SCHEMA SchemaName; or the equivalent DROP statement for the conflicting object type.
  • Re-run the original creation script after the drop completes successfully.

Step 4: Clear Orphaned Metadata (If Drop Fails)

  • If the object appears to exist but cannot be dropped normally, restart the SQL Server service via services.msc on Windows Server 2025 to clear cached metadata locks.
  • Alternatively, run DBCC CHECKDB('YourDatabaseName') WITH NO_INFOMSGS; to detect and repair catalog corruption causing phantom object references.

Step 5: Re-deploy Using Idempotent Scripts

  • Update your CI/CD pipeline or deployment tool (SSDT, Azure DevOps, Flyway) to use idempotent SQL patterns going forward.
  • Ensure DACPAC deployments use the /p:BlockOnPossibleDataLoss=false and schema comparison options to avoid duplicate object creation attempts.

Alternative or Verification Steps

  • Verify the fix by re-running the original script or deployment pipeline and confirming it completes without Error 10918 in the SQL Server Error Log (Management > SQL Server Logs in SSMS).
  • If the error persists intermittently, check for concurrent deployment jobs or replication agents running simultaneously against the same database, as parallel execution is a common root cause of duplicate object creation attempts.