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

Troubleshooting Guide: SQL Server Error 10129 – View Creation Failure on Table-Valued Functions

Why This Error Happens

This error occurs because SQL Server does not permit the creation of indexed views (or views with schemabinding requiring certain metadata operations) that reference inline or multi-statement table-valued functions (TVFs). The SQL Server query optimizer cannot resolve the underlying base table dependencies and column-level schema binding through a TVF layer, as it can with direct table or standard view references. This limitation is by design in the SQL Server relational engine and is not caused by corruption, permissions, or configuration drift—it is a structural restriction in how views are bound to function calls.

Step-by-Step Resolution Guide

Step 1: Identify the Offending View and Function

  • Open SQL Server Management Studio (SSMS) and locate the view mentioned in the error message (the %.*ls placeholder for the view name).
  • Run sp_helptext 'YourViewName' to retrieve the full view definition.
  • Note the specific table-valued function referenced (the second %.*ls placeholder) and run sp_helptext 'YourFunctionName' to review its logic.

Step 2: Manually Expand the Function Logic into the View

  • Copy the SELECT statement and any JOIN, WHERE, or CASE logic from inside the TVF definition.
  • Paste this logic directly into the view’s CREATE VIEW or ALTER VIEW script, replacing the call to the function (e.g., SELECT * FROM dbo.MyFunction(@param)).
  • Ensure you manually substitute any function parameters with literal values, variables, or correlated subquery logic that matches the original intent of the function.
  • Example transformation:
  • Before: SELECT a.ID FROM dbo.Orders a CROSS APPLY dbo.GetOrderDetails(a.ID) b
  • After: SELECT a.ID FROM dbo.Orders a INNER JOIN dbo.OrderDetails b ON a.ID = b.OrderID

Step 3: Apply Schema Binding (If Required)

  • If the view requires WITH SCHEMABINDING (common for indexed views), ensure every table referenced in your newly expanded code uses two-part naming (e.g., dbo.TableName).
  • Remove any remaining calls to user-defined functions (UDFs) within the view body, as schema-bound views cannot reference non-deterministic or complex TVFs.
  • Re-run the ALTER VIEW script in SSMS to validate the syntax.

Step 4: Rebuild Indexes and Validate Dependencies

  • If this view is intended to be an indexed view, recreate the unique clustered index using: CREATE UNIQUE CLUSTERED INDEX IX_ViewName ON dbo.YourViewName (Column1).
  • Check sys.sql_expression_dependencies to confirm the view no longer lists the old TVF as a dependency.

Alternative or Verification Steps

  • Verification: Query sys.views and sys.objects to confirm the view compiles without the WITH SCHEMABINDING error, and attempt to SELECT TOP 10 * FROM YourViewName to ensure data returns correctly.
  • Alternative: If the function logic is too complex to “flatten” manually, consider converting the business logic into a standard Stored Procedure instead of a view, as stored procedures do not have the same schema-binding restrictions regarding TVFs.

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

Troubleshooting Guide: SQL Server Error 10130 – Non-Deterministic CLR Table-Valued Function in Indexed View

Why This Error Happens

This error occurs because SQL Server requires all functions referenced in an indexed (schema-bound) view to be deterministic, meaning they must always return the same result for the same input. A CLR table-valued function (TVF) marked as non-deterministic—either explicitly via the IsDeterministic property on the SqlFunction attribute, or implicitly due to its internal logic (e.g., calls to system time, random number generators, or external resources)—violates this requirement. SQL Server 2025 cannot guarantee the index on the view will remain consistent if the underlying function’s output can vary across identical calls, so it blocks the index creation outright.

Step-by-Step Resolution Guide

Step 1: Identify the Offending CLR Function

  • Open SQL Server Management Studio (SSMS) and locate the view definition using sp_helptext 'YourSchema.YourViewName';
  • Identify the CLR table-valued function referenced in the CREATE VIEW statement (it will match the %.*ls placeholder in the error message).
  • Check the function’s assembly source code (the .cs or .vb file) for the SqlFunction attribute, specifically looking for IsDeterministic = false or a missing IsDeterministic declaration (which defaults to non-deterministic).

Step 2: Modify the CLR Assembly to Be Deterministic

  • Open the Visual Studio project containing the CLR function source code, typically located under C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Binn\ or your custom deployment folder.
  • Update the attribute decorator to explicitly declare determinism, for example:
    [SqlFunction(IsDeterministic = true, IsPrecise = true)]
  • Ensure the function logic truly is deterministic (no calls to DateTime.Now, Guid.NewGuid(), random number generators, or external I/O/network calls).
  • Recompile the assembly and redeploy it using:
    ALTER ASSEMBLY YourAssemblyName FROM 'C:\Path\To\YourAssembly.dll';

Step 3: Drop and Recreate the Indexed View

  • Since the view is schema-bound, you must drop any existing indexes and the view itself before making changes:
    DROP INDEX IF EXISTS IX_YourIndexName ON YourSchema.YourViewName;
    DROP VIEW IF EXISTS YourSchema.YourViewName;
  • Recreate the view using CREATE VIEW ... WITH SCHEMABINDING AS ... referencing the updated, now-deterministic CLR function.
  • Attempt to recreate the index:
    CREATE UNIQUE CLUSTERED INDEX IX_YourIndexName ON YourSchema.YourViewName (YourColumn);

Step 4: Validate Function Metadata in SQL Server

  • Run the following query to confirm SQL Server now recognizes the function as deterministic:
    SELECT name, is_deterministic FROM sys.objects WHERE type = 'FT' AND name = 'YourFunctionName';
  • If is_deterministic still returns 0, the assembly metadata was not refreshed correctly—drop and re-register the assembly completely rather than using ALTER ASSEMBLY.

Alternative or Verification Steps

  • Verify the fix: After recreating the index, run DBCC CHECKTABLE('YourSchema.YourViewName') and confirm no errors are returned, then check sys.indexes to ensure the index status shows as is_disabled = 0.
  • Alternative workaround: If the CLR function’s logic inherently requires non-deterministic behavior (e.g., it depends on external state), remove the function call from the view and instead reference it directly in queries against the base tables, or consider creating a non-indexed standard view instead.

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

Troubleshooting Guide: Error 10128 — CONTAINS/FREETEXT Predicate on Indexed View

Why This Error Happens

This error occurs because SQL Server does not allow full-text search predicates (CONTAINS or FREETEXT) to be used in the definition of a view that you are attempting to index (create a clustered index on, or “materialize”). Indexed views require deterministic, schema-bound expressions that can be persisted and incrementally maintained, but full-text predicates rely on a separate, asynchronous full-text index population process that cannot guarantee deterministic row-level results at the time of index creation. Essentially, the SQL Server Query Optimizer blocks this operation because it cannot reconcile the real-time nature of full-text indexing with the static storage requirements of an indexed view.

Step-by-Step Resolution Guide

Step 1: Identify and Isolate the Full-Text Predicate

  • Open SQL Server Management Studio (SSMS) and run sp_helptext 'YourViewName' to view the exact T-SQL definition.
  • Locate the specific WHERE clause or JOIN condition containing CONTAINS(column, 'term') or FREETEXT(column, 'term').
  • Note the base table and column names being referenced by the full-text predicate, as you will need to restructure the query around these.

Step 2: Refactor the View Definition

  • Remove the CONTAINS or FREETEXT predicate entirely from the view’s SELECT statement.
  • Modify the view to simply select the raw columns needed (e.g., the ID and the text column) without filtering by the search term.
  • Execute the ALTER VIEW statement with SCHEMABINDING enabled (required for indexing) but without the full-text logic:
 ALTER VIEW dbo.YourView WITH SCHEMABINDING AS
 SELECT ID, TextColumn FROM dbo.BaseTable

Step 3: Move the Full-Text Logic to the Query Level

  • Instead of filtering inside the view, apply the CONTAINS or FREETEXT predicate when you query the underlying base table or the newly simplified view directly in your application code or stored procedure.
  • Example: SELECT * FROM dbo.YourView AS V JOIN dbo.BaseTable AS B ON V.ID = B.ID WHERE CONTAINS(B.TextColumn, 'SearchTerm').
  • This separates the “indexed” aggregation/join logic (handled by the view) from the “search” logic (handled by the full-text engine).

Step 4: Rebuild the Clustered Index

  • Once the view definition is clean of full-text predicates, attempt to create the unique clustered index again.
  • Run: CREATE UNIQUE CLUSTERED INDEX IX_YourView ON dbo.YourView (ID).
  • Verify the index creation completes without throwing Error 10128 or related schema-binding errors (like Error 1939).

Alternative or Verification Steps

  • Verification: Run SELECT OBJECT_ID('dbo.YourView', 'V') and check sys.indexes to confirm the clustered index now exists on the view without errors.
  • Alternative: If the search logic is essential to the view’s core function, consider creating a Full-Text Index directly on the base table instead of trying to index the view; this allows search functionality to coexist with standard non-indexed views that reference CONTAINS.

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

Troubleshooting Guide: Error 10126 – Indexed View Creation Failure with DISTINCT Aggregate

Why This Error Happens

This error occurs because SQL Server’s indexed view engine cannot deterministically materialize an aggregate function (such as SUM, AVG, or COUNT) when the DISTINCT keyword is applied to it within a view definition. Indexed views require that all aggregates be maintainable incrementally as underlying base table data changes, and DISTINCT aggregates break this requirement because SQL Server cannot efficiently track unique values during row-level inserts, updates, and deletes. This is a design limitation of the Query Optimizer’s materialized view engine in SQL Server 2025, not a corruption or permissions issue.

Step-by-Step Resolution Guide

Step 1: Identify the Offending Aggregate in the View Definition

  • Open SQL Server Management Studio (SSMS) and locate the view definition using sp_helptext 'YourViewName';
  • Look specifically for patterns like COUNT(DISTINCT ColumnName), SUM(DISTINCT ColumnName), or AVG(DISTINCT ColumnName).
  • Confirm the error message column/view names match the output from Error 10126 in your SQL Server Error Log or Event Viewer (Event ID 10126).

Step 2: Rewrite the View Using GROUP BY Instead of DISTINCT

  • Replace the DISTINCT aggregate logic with a GROUP BY clause on the grouping columns, since indexed views fully support GROUP BY with COUNT_BIG(*).
  • Example rewrite:
  -- Instead of: SELECT COUNT(DISTINCT CustomerID) FROM Orders
  -- Use:
  CREATE VIEW dbo.vw_DistinctCustomers WITH SCHEMABINDING AS
  SELECT CustomerID, COUNT_BIG(*) AS RowCount
  FROM dbo.Orders
  GROUP BY CustomerID;
  • Ensure COUNT_BIG(*) is included in the SELECT list, as this is mandatory for all indexed views containing a GROUP BY.

Step 3: Recreate the View with Proper Schema Binding

  • Drop the existing view: DROP VIEW dbo.YourViewName;
  • Recreate it using WITH SCHEMABINDING and the corrected GROUP BY logic from Step 2.
  • Verify two-part naming (e.g., dbo.TableName) is used for all referenced tables, as schema binding requires fully qualified object names.

Step 4: Create the Unique Clustered Index

  • Run the CREATE UNIQUE CLUSTERED INDEX statement against the corrected view:
  CREATE UNIQUE CLUSTERED INDEX IX_vw_DistinctCustomers 
  ON dbo.vw_DistinctCustomers (CustomerID);
  • Confirm the index creation completes without triggering Error 10126 or related errors (10121, 10122).

Alternative or Verification Steps

  • Verify the fix: Query sys.indexes and sys.views to confirm the clustered index now exists on the view (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID('dbo.vw_DistinctCustomers');), then test with sample INSERT/UPDATE statements on the base table to ensure the index updates automatically.
  • Alternative approach: If rewriting with GROUP BY is not feasible due to application logic constraints, leave the view as a standard (non-indexed) view and instead create non-clustered indexes on the underlying base tables to improve query performance without requiring materialization.

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

Troubleshooting Guide: SQL Server Error 10127 — Cannot Create Indexed View on Subqueries

Why This Error Happens

Error 10127 occurs when you attempt to create a unique clustered index on a view that contains one or more subqueries in its SELECT statement. SQL Server’s Indexed View engine requires a materializable, deterministic result set, and subqueries (correlated or uncorrelated) introduce a level of logical complexity that prevents the Query Optimizer from persisting the result set reliably. This is a schema design limitation rather than a permissions or connectivity issue, meaning the view’s T-SQL must be rewritten before the index can be created.

Step-by-Step Resolution Guide

Step 1: Identify the Offending Subquery

  • Open SQL Server Management Studio (SSMS) connected to your Windows Server 2025 instance and run sp_helptext 'YourViewName' to retrieve the full view definition.
  • Look for WHERE, SELECT, or FROM clauses containing nested SELECT statements (e.g., IN (SELECT ...), EXISTS (SELECT ...), or scalar subqueries in the column list).
  • Note every table referenced inside the subquery, as these will need to be converted into JOIN clauses.

Step 2: Rewrite the View Using Explicit Joins

  • Replace EXISTS or IN subqueries with an INNER JOIN or LEFT JOIN to the referenced table, using DISTINCT or GROUP BY where necessary to avoid row duplication.
  • For scalar subqueries in the SELECT list (e.g., (SELECT MAX(Date) FROM OrderHistory WHERE ...)), convert them into a derived table or a CROSS APPLY statement, then join it in the main FROM clause.
  • Execute ALTER VIEW YourViewName AS ... with the new join-based syntax, ensuring SCHEMABINDING is included since it is required for indexed views.

Step 3: Recreate the Unique Clustered Index

  • Run the following syntax in a new query window:
CREATE UNIQUE CLUSTERED INDEX IX_YourView_Index
ON dbo.YourViewName (ColumnName);
  • If Error 10127 persists, run sp_helptext again to confirm the subquery was fully removed and not just relocated to a different clause.
  • Check Windows Server 2025 Event Viewer under Applications and Services Logs > MSSQLSERVER to confirm no underlying schema-binding errors (like Error 1947) are occurring simultaneously.

Step 4: Validate SCHEMABINDING Dependencies

  • Ensure all underlying tables referenced in the JOIN (previously the subquery) are called using two-part naming conventions (e.g., dbo.TableName) rather than just TableName.
  • Verify that SET ANSI_NULLS ON and SET QUOTED_IDENTIFIER ON are present immediately before the CREATE VIEW statement, as SCHEMABINDING will fail to compile without these session settings active.

Alternative or Verification Steps

  • Verification: Run SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID('YourViewName') to confirm the clustered index now exists in the sys.indexes catalog view without throwing an error.
  • Alternative: If the subquery logic is too complex to convert to a join (e.g., deeply nested aggregations), consider using an Indexed Computed Column on the base table instead, or implement a standard (non-indexed) view and manage performance via a nightly MATERIALIZED staging table instead.

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

Troubleshooting Guide: SQL Server Error 10124

Why This Error Happens

Error 10124 occurs when an attempt is made to create an index, statistic, or constraint on a view that references one or more internal SQL Server system columns, such as $IDENTITY, $ROWGUID, or $ACTION (used in change tracking or MERGE statements). SQL Server reserves these pseudo-columns for internal metadata tracking and does not permit them to be materialized as part of a user-defined indexed view schema. This typically happens when a view’s SELECT statement uses a wildcard (SELECT *) against a table that contains these special column types, inadvertently pulling the internal reference into the view definition.

Step-by-Step Resolution Guide

Step 1: Identify the Offending View Definition

  • Open SQL Server Management Studio (SSMS) and locate the view mentioned in the error message (%.*ls).
  • Run sp_helptext 'YourViewName'; to review the exact T-SQL definition.
  • Check the underlying base tables for columns with the ROWGUIDCOL property or identity specifications that might be implicitly selected.

Step 2: Rewrite the View to Exclude Internal Columns

  • Modify the view to explicitly list column names instead of using SELECT *.
  • Remove any explicit reference to internal system functions like $IDENTITY or $ROWGUID if they were manually added for tracking purposes.
  • Example fix syntax:
ALTER VIEW dbo.YourViewName
AS
SELECT Column1, Column2, Column3
FROM dbo.YourBaseTable;

Step 3: Rebuild the Index or Constraint

  • Attempt to recreate the UNIQUE CLUSTERED INDEX or constraint on the updated view.
  • Ensure the view is created with SCHEMABINDING enabled, as this is required for indexed views and helps prevent accidental internal column references upon future alterations.
  • Verify the base table schema has not changed recently to reintroduce an identity or GUID conflict.

Step 4: Check for Change Tracking Conflicts

  • If the database has Change Tracking enabled, ensure the view logic does not attempt to capture the SYS_CHANGE_VERSION or $ACTION metadata directly within a standard view index.
  • Disable and re-enable Change Tracking on the specific table if metadata corruption is suspected: ALTER TABLE YourTable DISABLE CHANGE_TRACKING;

Alternative or Verification Steps

  • Verification: Run DBCC CHECKDB on the specific database to ensure no underlying corruption is causing columns to be mismatched or incorrectly flagged as “internal” (this is rare but possible in corrupted SQL 2025 instances).
  • Alternative: If the view absolutely requires logic involving an identity or GUID column for business logic, convert the view into a standard (non-indexed) view and move the indexing strategy to the underlying base table instead.

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

Why This Error Happens

This error occurs because SQL Server 2025 enforces strict requirements for creating indexed views, and certain aggregate functions (such as AVG, MIN, MAX, STDEV, or VAR) are not permitted in the view definition. Indexed views require deterministic, precomputable aggregates like SUM or COUNT_BIG so the engine can materialize and maintain the result set efficiently. When an unsupported aggregate is detected during the CREATE INDEX operation on the view, the schema binding process fails and raises Error 10125.

Step-by-Step Resolution Guide

Step 1: Identify the Offending Aggregate in the View Definition

  • Open SQL Server Management Studio (SSMS) and run sp_helptext 'YourViewName' to review the full view script.
  • Look specifically for AVG(), MIN(), MAX(), STDEV(), STDEVP(), VAR(), or VARP() in the SELECT clause.
  • Note the exact column and aggregate causing the conflict (the error message will specify "%.*ls").

Step 2: Rewrite the Aggregate Using Supported Functions

  • Replace unsupported aggregates with equivalent calculations using SUM and COUNT_BIG.
  • Example: Instead of AVG(SalesAmount), use SUM(SalesAmount) and COUNT_BIG(SalesAmount) as separate columns, then calculate the average in a downstream query: SUM(SalesAmount) / COUNT_BIG(SalesAmount).
  • For MIN/MAX, consider removing them from the indexed view and handling that logic in a standard (non-indexed) view or application-layer query instead.

Step 3: Drop and Recreate the View with ALTER VIEW

  • Run ALTER VIEW YourViewName WITH SCHEMABINDING AS followed by the corrected SELECT statement.
  • Ensure WITH SCHEMABINDING is still present, as this is mandatory for indexed views.
  • Confirm all referenced tables use two-part naming (dbo.TableName) since schema-bound views require this syntax.

Step 4: Recreate the Unique Clustered Index

  • Once the view compiles successfully, run:
  • CREATE UNIQUE CLUSTERED INDEX IX_YourView ON YourViewName (KeyColumn);
  • Verify the index creation completes without further aggregate-related errors.

Alternative or Verification Steps

  • Verify the fix by querying sys.indexes and sys.views to confirm the index now exists and the view shows is_schema_bound = 1.
  • If the business logic absolutely requires AVG or MIN/MAX behavior, skip indexing this particular view and instead create a standard view or materialize the aggregate into a separate summary table maintained via a scheduled job or trigger.

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

Troubleshooting Guide: Error 10122 – Cannot Create Index on View Containing a COMPUTE Clause

Why This Error Happens

This error occurs because SQL Server 2025 does not support creating indexed (materialized) views on view definitions that include a COMPUTE or COMPUTE BY clause. Indexed views require deterministic, schema-bound queries that produce a stable result set, and the COMPUTE clause generates summary/aggregate rows outside the standard result set structure, which violates this requirement. Since COMPUTE is also a deprecated T-SQL feature, the Database Engine blocks index creation entirely rather than attempting a partial workaround.

Step-by-Step Resolution Guide

Step 1: Identify the Offending View Definition

  • Run sp_helptext 'YourViewName' in SQL Server Management Studio (SSMS) to inspect the full view definition.
  • Look specifically for COMPUTE or COMPUTE BY keywords near the end of the SELECT statement.
  • Note any columns referenced in the COMPUTE clause, as you will need to replace their logic.

Step 2: Rewrite the View Using Modern Aggregate Syntax

  • Remove the COMPUTE / COMPUTE BY clause entirely from the view definition.
  • Replace the aggregate logic using standard GROUP BY, ROLLUP, or window functions (e.g., SUM() OVER (PARTITION BY ...)).
  • Example fix:
  -- Old (unsupported in indexed views):
  SELECT CustomerID, OrderTotal FROM Orders COMPUTE SUM(OrderTotal)

  -- New (indexable):
  SELECT CustomerID, OrderTotal, SUM(OrderTotal) OVER (PARTITION BY CustomerID) AS RunningTotal
  FROM Orders
  • Update the view using ALTER VIEW YourViewName WITH SCHEMABINDING AS ... to re-bind it with schema binding enabled.

Step 3: Validate Schema Binding Requirements

  • Ensure the view uses two-part naming (dbo.TableName) for all referenced tables, as SCHEMABINDING requires this.
  • Confirm all base tables use deterministic functions only (no GETDATE(), NEWID(), etc.) in computed columns.
  • Verify SET ANSI_NULLS ON and SET QUOTED_IDENTIFIER ON were in effect when the view was created.

Step 4: Recreate the Unique Clustered Index

  • Once the view compiles successfully under SCHEMABINDING, run:
  CREATE UNIQUE CLUSTERED INDEX IX_YourView_Index 
  ON YourViewName (KeyColumn);
  • Confirm the index creation completes without Error 10122 or related schema-binding errors (e.g., Error 10112).

Alternative or Verification Steps

  • Verify the fix: Query sys.indexes and sys.views to confirm the index exists and the view shows is_schema_bound = 1 in sys.sql_modules.
  • Alternative: If rewriting the aggregate logic is not feasible, skip indexing the view and instead create a nonclustered index on an underlying indexed table, or use an indexed computed column in the base table to achieve similar query performance gains.

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

Troubleshooting Guide: SQL Server Error 10120

Why This Error Happens

This error occurs because SQL Server does not allow indexed (materialized) views to be created on view definitions that use the ROLLUP operator, since aggregate rollups produce NULL values and subtotal rows that violate the deterministic, non-nullable column requirements of indexed views. Attempting to run CREATE UNIQUE CLUSTERED INDEX on such a view triggers Error 10120 because the engine cannot guarantee a stable, unique key for every row in the result set. This is a design limitation rather than a bug — it stems from the fundamental incompatibility between aggregate rollup semantics and index materialization.

Step-by-Step Resolution Guide

Step 1: Identify the Offending View Definition

  • Run sp_helptext 'YourViewName' in SQL Server Management Studio (SSMS) to inspect the view’s T-SQL.
  • Look specifically for GROUP BY ... WITH ROLLUP, ROLLUP(...), or GROUPING SETS clauses in the SELECT statement.
  • Confirm the error is tied to an index creation attempt via CREATE UNIQUE CLUSTERED INDEX IX_Name ON dbo.ViewName (...).

Step 2: Remove or Refactor the ROLLUP Logic

  • Rewrite the view to use a standard GROUP BY clause without ROLLUP, CUBE, or GROUPING SETS.
  • If subtotal rows are required, move the ROLLUP logic into a separate reporting query or stored procedure that queries the base (non-indexed) view instead.
  • Example fix: change GROUP BY ROLLUP(Region, Product) to GROUP BY Region, Product in the view, and handle rollup aggregation at the application or reporting layer.

Step 3: Recreate the View and Apply the Index

  • Drop the existing view using DROP VIEW dbo.YourViewName;.
  • Recreate it with CREATE VIEW dbo.YourViewName WITH SCHEMABINDING AS SELECT ... (ensure SCHEMABINDING is included, as it’s required for indexed views).
  • Run CREATE UNIQUE CLUSTERED INDEX IX_YourViewName ON dbo.YourViewName (KeyColumn); to confirm the index now creates successfully.

Step 4: Validate Permissions and Session Settings

  • Ensure the following SET options are correctly configured in your session before creating the index: ANSI_NULLS ON, ANSI_PADDING ON, ANSI_WARNINGS ON, ARITHABORT ON, CONCAT_NULL_YIELDS_NULL ON, QUOTED_IDENTIFIER ON, and NUMERIC_ROUNDABORT OFF.
  • Verify the executing login has ALTER permission on the schema and REFERENCES permission on underlying base tables.

Alternative or Verification Steps

  • After recreating the index, run SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID('dbo.YourViewName'); to confirm the index exists and is listed with is_unique = 1.
  • If ROLLUP functionality is business-critical and cannot be removed, skip indexing the view entirely and instead create standard non-clustered indexes on the underlying base tables to improve query performance for the aggregation.

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

Troubleshooting Guide: Error 10121 — Cannot Create View Index Due to HAVING Clause

Why This Error Happens

This error occurs when attempting to create an indexed (materialized) view in SQL Server 2025, but the view’s underlying SELECT statement includes a HAVING clause. SQL Server’s engine requires indexed views to produce a deterministic, non-aggregated-filter result set at the row level, and HAVING clauses filter data after aggregation, which conflicts with how the indexed view’s clustered index must map to the base tables. Because the optimizer cannot guarantee a stable, schema-bound row set for indexing purposes, it rejects the CREATE INDEX or CREATE VIEW ... WITH SCHEMABINDING operation outright.

Step-by-Step Resolution Guide

Step 1: Identify the Offending View Definition

  • Open SQL Server Management Studio (SSMS) and locate the view mentioned in the error message (the %.*ls placeholder will show the actual view name).
  • Run sp_helptext 'YourViewName' to retrieve the full CREATE VIEW script and confirm the presence of a HAVING clause.
  • Note any aggregate functions (SUM, COUNT, AVG, etc.) tied to the HAVING condition, as these will need to be restructured.

Step 2: Refactor the View to Remove the HAVING Clause

  • Rewrite the view using a Common Table Expression (CTE) or a derived subquery to perform the aggregation first, then apply the filtering condition in an outer WHERE clause instead of HAVING.
  • Example pattern:
  WITH AggregatedData AS (
      SELECT CustomerID, SUM(OrderTotal) AS TotalSpent
      FROM dbo.Orders
      GROUP BY CustomerID
  )
  SELECT CustomerID, TotalSpent
  FROM AggregatedData
  WHERE TotalSpent > 1000;
  • Ensure the view still includes WITH SCHEMABINDING in the definition, since this is mandatory for indexed views in SQL Server 2025.

Step 3: Recreate the View and Apply the Index

  • Drop the existing view using DROP VIEW dbo.YourViewName;.
  • Execute the corrected CREATE VIEW script with the WITH SCHEMABINDING option and the refactored query logic (no HAVING clause at the top level).
  • Run the CREATE UNIQUE CLUSTERED INDEX statement again on the view to confirm it now succeeds:
  CREATE UNIQUE CLUSTERED INDEX IX_YourView_CustomerID
  ON dbo.YourViewName (CustomerID);

Step 4: Validate Schema Binding Dependencies

  • Check that all base tables referenced in the view are two-part named (e.g., dbo.Orders) rather than using aliases without schema prefixes, as schema-bound views require this for indexing.
  • Use sys.sql_expression_dependencies to confirm no broken references exist after the refactor.

Alternative or Verification Steps

  • Verify the fix by querying sys.indexes joined with sys.objects to confirm the new clustered index exists on the view (is_unique = 1 and type_desc = 'CLUSTERED').
  • If restructuring the query is not feasible due to application constraints, consider moving the aggregation logic into a separate summary table maintained via a scheduled job or trigger, bypassing the indexed view requirement entirely.

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

Troubleshooting Guide: SQL Server Error 10118 — “Cannot create %S_MSG on view because it contains a GROUP BY ALL”

Why This Error Happens

This error occurs because SQL Server does not support creating indexed views, materialized views, or certain query constructs (like indexes or statistics) on views that use the GROUP BY ALL syntax. The GROUP BY ALL clause includes all groups in the result set regardless of the WHERE clause filter, which conflicts with the deterministic and filtered aggregation requirements needed for indexing or schema binding. This is a T-SQL syntax limitation rather than a permissions, port, or corruption issue—it is triggered purely by the view’s underlying SELECT statement definition.

Step-by-Step Resolution Guide

Step 1: Identify the Offending View Definition

  • Open SQL Server Management Studio (SSMS) on your Windows Server 2025 / Windows 11 instance.
  • Run the following query to locate the view’s definition:
  SELECT OBJECT_DEFINITION(OBJECT_ID('YourSchema.YourViewName')) AS ViewDefinition;
  • Confirm the presence of GROUP BY ALL in the SELECT statement output.

Step 2: Modify the View to Use Standard GROUP BY

  • Open the view definition script in a new query window.
  • Remove the ALL keyword from the GROUP BY ALL clause, converting it to a standard GROUP BY.
  • If the original intent was to include all groups (even those filtered out by WHERE), rewrite the logic using LEFT JOIN or UNION to replicate that behavior explicitly, since GROUP BY ALL is deprecated and unsupported for indexing purposes.
  • Example fix:
  ALTER VIEW YourSchema.YourViewName
  WITH SCHEMABINDING
  AS
  SELECT ProductID, SUM(Quantity) AS TotalQty
  FROM dbo.Sales
  GROUP BY ProductID; -- removed "ALL"

Step 3: Recreate the Index or Schema-Bound Object

  • Re-run the CREATE UNIQUE CLUSTERED INDEX (or the original statement that triggered Error 10118) against the updated view.
  • Ensure the view includes WITH SCHEMABINDING and that all referenced tables use two-part naming (e.g., dbo.TableName).
  • Confirm the SELECT list does not use SELECT * and that all aggregate functions include COUNT_BIG(*) if required for indexed views.

Step 4: Validate Dependent Objects

  • Check for any stored procedures, reports, or applications referencing the original GROUP BY ALL behavior.
  • Update dependent logic in Windows-based client applications or SSRS reports to account for the behavioral change (missing groups will no longer auto-populate with NULL aggregates).

Alternative or Verification Steps

  • Verify the fix by re-executing the failed CREATE INDEX or CREATE VIEW statement in SSMS—Error 10118 should no longer appear, and the index should build successfully.
  • If GROUP BY ALL behavior is business-critical, use a LEFT OUTER JOIN against a distinct list of grouping keys combined with a standard GROUP BY to simulate the “include all groups” effect without triggering the indexing restriction.

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

Troubleshooting Guide: SQL Server Error 10119 — Cannot Create Indexed View on CUBE/ROLLUP Query

Why This Error Happens

This error occurs because SQL Server 2025 does not allow indexed views (views with a unique clustered index) to be created on top of queries that use CUBE, ROLLUP, GROUPING SETS, or the GROUPING function. These aggregation extensions generate summary/superaggregate NULL rows that violate the deterministic, materializable row-set requirements needed for an indexed view’s clustered index to maintain integrity. The root cause is almost always a schema or query design issue rather than a permissions, port, or corruption problem — the view’s underlying SELECT statement simply contains a construct that is structurally incompatible with indexing.

Step-by-Step Resolution Guide

Step 1: Identify the Offending View Definition

  • Run sp_helptext 'YourViewName' in SQL Server Management Studio (SSMS) to pull the full view definition.
  • Look specifically for GROUP BY ... WITH CUBE, WITH ROLLUP, GROUPING SETS, or calls to the GROUPING() function in the SELECT list.
  • Note the exact line number and clause — this is what needs to be refactored before indexing can succeed.

Step 2: Refactor the View to Remove CUBE/ROLLUP Logic

  • Rewrite the view using a standard GROUP BY clause without CUBE, ROLLUP, or GROUPING SETS.
  • If you need the summary/subtotal rows elsewhere, move that logic into a separate non-indexed view or a reporting query instead of the base indexed view.
  • Example fix:
  -- Before (fails with 10119)
  CREATE VIEW dbo.vw_SalesSummary WITH SCHEMABINDING AS
  SELECT ProductID, SUM(Amount) AS Total
  FROM dbo.Sales
  GROUP BY ProductID WITH CUBE;

  -- After (compatible with indexing)
  CREATE VIEW dbo.vw_SalesSummary WITH SCHEMABINDING AS
  SELECT ProductID, SUM(Amount) AS Total, COUNT_BIG(*) AS Cnt
  FROM dbo.Sales
  GROUP BY ProductID;

Step 3: Recreate the View with Proper Schemabinding

  • Ensure WITH SCHEMABINDING is included in the CREATE VIEW statement — this is mandatory for indexed views.
  • Confirm all base tables use two-part naming (dbo.TableName) inside the view definition.
  • Include COUNT_BIG(*) in the SELECT list if you plan to use aggregate functions, as required by indexed view rules.

Step 4: Create the Unique Clustered Index

  • Once the view compiles without CUBE/ROLLUP constructs, create the index:
  CREATE UNIQUE CLUSTERED INDEX IX_vw_SalesSummary
  ON dbo.vw_SalesSummary (ProductID);
  • Verify the index build completes without additional errors (such as 10116 or 10117, which relate to other indexed view restrictions like non-deterministic functions).

Alternative or Verification Steps

  • Verify the fix by querying sys.indexes and sys.views to confirm the clustered index now exists against the view (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID('dbo.vw_SalesSummary')).
  • If you still require CUBE/ROLLUP-style aggregation for reporting, build a separate non-indexed view or materialize the data into a physical summary table updated via a scheduled job or indexed trigger instead of relying on an indexed view.

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

Troubleshooting Guide: SQL Server Error 10117 — View Index Creation Failure with Wildcard Columns

Why This Error Happens

This error occurs because SQL Server requires an explicit, deterministic column list when creating an indexed view, and the SELECT * syntax does not satisfy this requirement since the schema binding cannot guarantee column stability if the underlying table structure changes. SQL Server 2025 enforces strict schema-binding rules for indexed views to ensure that the index remains valid even if columns are added or dropped from the base table later. Because the view was originally defined using the wildcard operator, the metadata does not lock in a fixed column set, causing the CREATE INDEX or CREATE STATISTICS operation to fail.

Step-by-Step Resolution Guide

Step 1: Identify the Problematic View Definition

  • Open SQL Server Management Studio (SSMS) or Azure Data Studio connected to your SQL Server 2025 instance.
  • Run the following query to locate the view’s current definition:
  EXEC sp_helptext 'YourViewName';
  • Confirm that the SELECT statement uses SELECT * FROM... instead of named columns.

Step 2: Modify the View to Use Explicit Column Names

  • Drop or alter the existing view using ALTER VIEW to avoid breaking dependent permissions.
  • Rewrite the SELECT statement by explicitly naming every column instead of using the wildcard:
  ALTER VIEW dbo.YourViewName
  WITH SCHEMABINDING
  AS
  SELECT Column1, Column2, Column3
  FROM dbo.YourBaseTable;
  • Ensure WITH SCHEMABINDING is included, as this is mandatory for creating indexed views in SQL Server 2025.

Step 3: Re-attempt the Index or Statistics Creation

  • Once the view is updated, re-run the original command that failed:
  CREATE UNIQUE CLUSTERED INDEX IDX_YourView ON dbo.YourViewName (Column1);
  • If the error persists, check for nested views or subqueries within the definition that may also contain hidden SELECT * statements.

Step 4: Validate Dependent Objects

  • Use the following query to check if other objects (stored procedures, triggers, or secondary views) reference the modified view and verify they are not relying on wildcard column behavior:
  SELECT * FROM sys.sql_expression_dependencies 
  WHERE referenced_entity_name = 'YourViewName';
  • Update any dependent objects to reflect the new explicit column structure if necessary.

Alternative or Verification Steps

  • Verification: Run SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID('dbo.YourViewName') to confirm the index was successfully created without throwing Error 10117.
  • Alternative: If modifying the view is not immediately feasible, create a new “shadow” view with explicit columns for indexing purposes while keeping the original wildcard view for general reporting use.

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

Troubleshooting Guide: Error 10115 – Indexed View Creation Fails Due to UNPIVOT Operator

Why This Error Happens

Error 10115 occurs because SQL Server’s indexed view engine does not support the UNPIVOT relational operator within the view definition. Indexed views require deterministic, schema-bound logic that produces a predictable one-to-one row mapping, and UNPIVOT violates this requirement because it dynamically transforms columns into rows. This is a hard architectural limitation in SQL Server 2025, not a permissions or configuration issue, so the index creation will fail on every attempt until the view logic itself is rewritten.

Step-by-Step Resolution Guide

Step 1: Identify the Offending View Definition

  • Run sp_helptext 'YourViewName' in SQL Server Management Studio (SSMS) to inspect the full view script.
  • Look specifically for the UNPIVOT keyword in the SELECT statement referenced in the error message (%.*ls).
  • Confirm the view was created with WITH SCHEMABINDING, since that is a prerequisite for indexing attempts.

Step 2: Rewrite the View Using UNION ALL Instead of UNPIVOT

  • Replace the UNPIVOT logic with an equivalent UNION ALL construct, which is fully supported in indexed views.
  • Example pattern:
  SELECT ID, 'Col1' AS ColumnName, Col1 AS Value FROM dbo.SourceTable
  UNION ALL
  SELECT ID, 'Col2' AS ColumnName, Col2 AS Value FROM dbo.SourceTable
  • Ensure the rewritten view still includes WITH SCHEMABINDING and avoids other restricted constructs (e.g., OUTER JOIN, TOP, subqueries).

Step 3: Drop and Recreate the View with Schema Binding

  • Execute DROP VIEW dbo.YourViewName; in SSMS or via sqlcmd.
  • Recreate the view using the UNION ALL logic from Step 2, confirming no syntax errors with SET PARSEONLY ON testing beforehand.
  • Save the updated script under version control (e.g., C:\SQLScripts\Views\YourViewName.sql) for auditing.

Step 4: Create the Clustered Index on the New View

  • Run the CREATE UNIQUE CLUSTERED INDEX statement targeting the rewritten view.
  • Example:
  CREATE UNIQUE CLUSTERED INDEX IX_YourView_ID 
  ON dbo.YourViewName (ID, ColumnName);
  • Monitor the SQL Server Error Log (C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Log\ERRORLOG) for any secondary schema-binding violations.

Alternative or Verification Steps

  • Verify success by querying sys.indexes and sys.views to confirm the index exists and the view is schema-bound (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID('dbo.YourViewName');).
  • If rewriting with UNION ALL is not feasible due to complexity, consider leaving the view non-indexed and instead create a standard nonclustered index on the underlying base tables to improve query performance indirectly.

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

Troubleshooting Guide: Error 10116 – Cannot Create Index on View Containing UNION

Why This Error Happens

SQL Server Error 10116 occurs because SQL Server does not allow you to create an indexed (materialized) view when the view definition contains a UNION or UNION ALL operator. Indexed views require a deterministic, schema-bound structure that SQL Server can maintain automatically as underlying table data changes, and the set-combination logic of UNION prevents the Query Optimizer from guaranteeing this deterministic behavior. This is a design limitation by Microsoft, not a bug, corruption issue, or permissions problem.

Step-by-Step Resolution Guide

Step 1: Identify the Offending View Definition

  • Run sp_helptext 'YourViewName' in SQL Server Management Studio (SSMS) to view the full T-SQL definition.
  • Look specifically for UNION or UNION ALL keywords combining two or more SELECT statements.
  • Confirm the view is currently schema-bound using: SELECT OBJECTPROPERTY(OBJECT_ID('YourViewName'), 'IsSchemaBound').

Step 2: Refactor the View to Remove UNION

  • Split the single UNION-based view into two or more separate schema-bound views (e.g., vw_PartA and vw_PartB), each containing only one SELECT statement.
  • Create a standard index on each individual schema-bound view separately using CREATE UNIQUE CLUSTERED INDEX.
  • If you need the combined dataset, create a third, standard (non-indexed) view that performs the UNION ALL over the two new indexed views.

Step 3: Alternatively, Use a Helper Table

  • If splitting the view breaks application logic, create a physical “helper” table that mirrors the schema of the required output.
  • Populate this table using an INSTEAD OF trigger or a scheduled SQL Server Agent job that merges the datasets via UNION ALL.
  • Place a standard clustered index directly on this physical table to achieve the required query performance.

Step 4: Rebuild the Index on the Non-Union Portion

  • Navigate to SSMS > Object Explorer > Databases > [Your DB] > Views > [Your View] > Indexes.
  • Right-click Indexes and select New Index > Clustered Index.
  • Ensure the WITH SCHEMABINDING option was used in the CREATE VIEW statement, as this is a prerequisite for the index to be created successfully on the non-union view.

Alternative or Verification Steps

  • Verify the Fix: Run the CREATE UNIQUE CLUSTERED INDEX command on the newly split views. If the command executes without Error 10116, the fix was successful.
  • Alternative Check: Use sys.indexes and sys.views system catalog views to confirm the index object now exists and is correctly associated with the object_id of the refactored view.

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

Troubleshooting Guide: Error 10113 – Cannot Create Index on View Using LEFT/RIGHT/OUTER Join

Why This Error Happens

SQL Server 2025 enforces strict determinism rules when creating an indexed (materialized) view, and one of those rules explicitly disallows LEFT, RIGHT, or FULL OUTER JOIN syntax in the view’s underlying SELECT statement. This restriction exists because outer joins can produce NULL-padded rows whose membership in the result set may change unpredictably as base table data changes, which conflicts with the deterministic, schema-bound nature required for an indexed view. The error is not caused by permissions, corruption, or configuration drift — it is a hard T-SQL language limitation tied directly to how the view is written.

Step-by-Step Resolution Guide

Step 1: Identify the Offending View Definition

  • Run sp_helptext 'SchemaName.ViewName' in SQL Server Management Studio (SSMS) to pull the full view definition.
  • Look specifically for LEFT JOIN, RIGHT JOIN, LEFT OUTER JOIN, or FULL OUTER JOIN clauses in the SELECT statement.
  • Confirm the exact view name referenced in the Error 10113 message matches the object you are inspecting.

Step 2: Rewrite the View Using INNER JOIN Logic

  • Convert the LEFT/RIGHT JOIN to an INNER JOIN if NULL-producing rows are not actually required for your reporting needs.
  • If NULLs are required, restructure the logic using a UNION ALL pattern: one branch with an INNER JOIN for matched rows, and a second branch using a NOT EXISTS or LEFT ANTI JOIN pattern to capture unmatched rows explicitly.
  • Example pattern:
  SELECT a.Col1, b.Col2
  FROM dbo.TableA a
  INNER JOIN dbo.TableB b ON a.ID = b.ID
  UNION ALL
  SELECT a.Col1, NULL
  FROM dbo.TableA a
  WHERE NOT EXISTS (SELECT 1 FROM dbo.TableB b WHERE b.ID = a.ID)

Step 3: Recreate the View with SCHEMABINDING

  • Drop the existing view using DROP VIEW SchemaName.ViewName;.
  • Recreate it with WITH SCHEMABINDING and fully qualified two-part table names (e.g., dbo.TableA, not just TableA).
  • Ensure all referenced tables use NOT NULL columns where possible, since indexed views also reject columns that allow NULLs in key positions.

Step 4: Rebuild the Clustered Index

  • Once the view compiles successfully without the outer join, create the required unique clustered index:
  CREATE UNIQUE CLUSTERED INDEX IX_ViewName_Index
  ON SchemaName.ViewName (KeyColumn);
  • Confirm the index creation completes without additional determinism errors (e.g., 10114, 10116) stemming from aggregates or non-deterministic functions.

Alternative or Verification Steps

  • Verify the fix by querying sys.indexes joined to sys.views to confirm the clustered index now exists on the view object, and run DBCC CHECKTABLE('SchemaName.ViewName') to validate integrity.
  • If rewriting the join logic is not feasible for business reasons, use a standard (non-indexed) view instead, or move the outer-join logic into a scheduled ETL process that materializes results into a physical staging table with its own index.

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

Troubleshooting Guide: SQL Server Error 10114 — “Cannot create %S_MSG on view because it uses the PIVOT operator”

Why This Error Happens

This error occurs because SQL Server does not support creating indexed (materialized) views that contain the PIVOT relational operator. The query optimizer cannot persist the physical row set of a view when PIVOT is used, since the aggregation and column rotation logic is dynamically resolved at execution time rather than being deterministically indexable. This is a design limitation enforced by the Database Engine, not a configuration error or permissions issue, and it will occur consistently on SQL Server 2025 running on either Windows Server 2025 or Windows 11 whenever a CREATE UNIQUE CLUSTERED INDEX statement targets a view containing PIVOT.

Step-by-Step Resolution Guide

Step 1: Identify the Offending View Definition

  • Open SQL Server Management Studio (SSMS) or Azure Data Studio and connect to the instance reporting the error.
  • Run sp_helptext 'SchemaName.ViewName' to pull the full view definition and locate the PIVOT clause.
  • Confirm the error context by checking SQL Server Error Log at C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Log\ERRORLOG for the exact statement that triggered Error 10114.

Step 2: Rewrite the View Using CASE/Aggregate Logic Instead of PIVOT

  • Replace the PIVOT operator with a CASE WHEN expression combined with standard GROUP BY and aggregate functions (e.g., SUM, MAX), since this syntax is fully compatible with indexed views.
  • Example rewrite pattern:
  SELECT
      CategoryID,
      SUM(CASE WHEN Quarter = 'Q1' THEN SalesAmount ELSE 0 END) AS Q1,
      SUM(CASE WHEN Quarter = 'Q2' THEN SalesAmount ELSE 0 END) AS Q2
  FROM dbo.SalesData
  GROUP BY CategoryID
  • Ensure the rewritten view also meets all other indexed view requirements (SCHEMABINDING, deterministic functions, no outer joins, COUNT_BIG(*) present if using aggregates).

Step 3: Apply SCHEMABINDING and Recreate the View

  • Alter the view definition to include WITH SCHEMABINDING at the top of the CREATE VIEW statement.
  • Drop the old, non-compliant view: DROP VIEW SchemaName.ViewName;
  • Recreate it using the rewritten CASE-based logic and re-run the CREATE UNIQUE CLUSTERED INDEX command on the new view.

Step 4: Validate Index Creation Permissions and Settings

  • Confirm the session has ANSI_NULLS ON and QUOTED_IDENTIFIER ON set before creating the view, as indexed views strictly require these settings.
  • Verify the executing login has ALTER permission on the schema and CREATE INDEX permission on the database (check via SELECT * FROM fn_my_permissions('SchemaName.ViewName', 'OBJECT')).

Alternative or Verification Steps

  • To verify the fix, re-run CREATE UNIQUE CLUSTERED INDEX IX_ViewName ON SchemaName.ViewName (ColumnName) — if it completes without Error 10114, the view is now indexable.
  • If rewriting the view is not feasible, leave the view non-indexed and instead create a persisted physical summary table (populated via a scheduled job or trigger) to achieve similar read-performance gains without violating the PIVOT restriction.

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

Troubleshooting Guide: SQL Server Error 10112

Why This Error Happens

This error occurs because SQL Server’s query optimizer does not allow join hints (such as LOOP, HASH, or MERGE) to be specified on an INNER join when that join logic is part of a view definition being used to create an indexed view or a schema-bound object. The SQL Server engine requires full control over the join strategy for indexed views to guarantee deterministic results, so an explicit hint in the view’s CREATE VIEW statement conflicts with this requirement. Essentially, the view’s underlying T-SQL script contains a hardcoded join hint that blocks the operation you are trying to perform (such as CREATE INDEX or SCHEMABINDING).

Step-by-Step Resolution Guide

Step 1: Locate the Offending View Definition

  • Open SQL Server Management Studio (SSMS) and connect to your Windows Server 2025 instance.
  • Run the following query to retrieve the view’s source code: EXEC sp_helptext 'YourViewName';
  • Scan the FROM clause of the script for keywords like INNER JOIN...WITH (LOOP), WITH (HASH), or WITH (MERGE).

Step 2: Edit the View Script to Remove the Hint

  • Open the script in a new query window within SSMS.
  • Locate the specific syntax (e.g., INNER JOIN TableB WITH (HASH) ON TableA.ID = TableB.ID).
  • Delete the WITH (HASH), WITH (LOOP), or WITH (MERGE) portion of the join clause entirely, leaving a standard INNER JOIN.
  • Save the edited script to a local .sql file on your Windows 11 or Windows Server 2025 machine as a backup.

Step 3: Alter the View in SQL Server

  • Execute an ALTER VIEW statement using the corrected script to update the object in the database.
  • Ensure the SCHEMABINDING option is still present in the ALTER VIEW syntax if you are preparing to create an indexed view.
  • Confirm the command completes with a “Command(s) completed successfully” message in the SSMS output pane.

Step 4: Re-attempt the Original Operation

  • Retry the specific command that triggered the original error (e.g., CREATE UNIQUE CLUSTERED INDEX).
  • Verify that SQL Server Agent or the application service account has ALTER permissions on the schema if the command fails due to access restrictions.

Alternative or Verification Steps

  • Verification: Run sp_helptext 'YourViewName' again to confirm the join hint syntax has been successfully removed from the metadata.
  • Alternative: If performance was the reason for the original join hint, use a OPTION (HASH JOIN) query hint on the SELECT statement that queries the view instead of hardcoding it into the view’s INNER JOIN clause itself.

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

Troubleshooting Guide: Error 10110 – Cannot Create Indexed View Containing OUTER APPLY

Why This Error Happens

SQL Server 2025 enforces strict requirements for indexed (materialized) views, and one of these restrictions explicitly disallows the use of OUTER APPLY or CROSS APPLY operators within the view definition. This limitation exists because the APPLY operator relies on correlated, row-by-row execution logic that conflicts with the way SQL Server materializes and maintains a unique clustered index on a view. Since the query optimizer cannot guarantee deterministic, set-based results for the index maintenance engine when APPLY is used, it blocks the CREATE INDEX operation entirely with Error 10110.

Step-by-Step Resolution Guide

Step 1: Identify the Offending View Definition

  • Locate the view referenced in the error message (replace %.*ls with your actual view name).
  • Run sp_helptext 'YourViewName' in SQL Server Management Studio (SSMS) to inspect the full T-SQL definition.
  • Look specifically for OUTER APPLY or CROSS APPLY clauses in the FROM section of the query.

Step 2: Rewrite the View Logic to Remove APPLY

  • Replace OUTER APPLY with a standard LEFT JOIN if the logic only requires joining on static columns rather than executing a correlated subquery per row.
  • If the APPLY operator is being used to call a Table-Valued Function (TVF) or derived table for row-specific calculations, evaluate if this logic can be pre-calculated or flattened into a JOIN condition.
  • Example transformation:
  • Old (Unsupported): FROM Orders o OUTER APPLY (SELECT TOP 1 * FROM OrderDetails od WHERE od.OrderID = o.OrderID) AS d
  • New (Supported): FROM Orders o LEFT JOIN OrderDetails od ON od.OrderID = o.OrderID

Step 3: Drop and Recreate the Index

  • Once the view definition no longer contains APPLY logic, update the view object using ALTER VIEW.
  • Ensure the view includes WITH SCHEMABINDING in the definition, as this is a mandatory prerequisite for indexing.
  • Execute the index creation command again: CREATE UNIQUE CLUSTERED INDEX IX_ViewName ON YourViewName (Column1);

Step 4: Validate Permissions and Schema Binding

  • Confirm the user account possesses REFERENCES permissions on the underlying base tables.
  • Check that all referenced tables use two-part naming conventions (e.g., dbo.TableName) within the SCHEMABINDING view, as missing schema prefixes can trigger secondary binding errors even after the APPLY logic is removed.

Alternative or Verification Steps

  • Verification: After recreating the index, run DBCC CHECKCONSTRAINTS or query sys.indexes to confirm the index status is “Enabled” and check the execution plan to ensure the Query Optimizer is now utilizing the clustered index scan.
  • Alternative: If the APPLY logic is too complex to convert to a JOIN (e.g., requires TOP 1 row selection per group), consider abandoning the indexed view approach for this specific logic and instead create a standard non-indexed view, or move the logic into an indexed computed column on the base table.

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

Troubleshooting Guide: SQL Server Error 10111 — ODBC Escape Syntax in Indexed Views

Why This Error Happens

Error 10111 occurs when SQL Server attempts to create an indexed view (or schema-bind a view) that contains a JOIN written using the ODBC standard escape syntax (e.g., {oj ... LEFT OUTER JOIN ... }). SQL Server requires deterministic, standard ANSI join syntax to build and maintain an indexed view’s clustered index, and the ODBC escape sequence is not supported for this operation because it cannot be reliably resolved by the query optimizer during index creation. This typically happens when views are auto-generated by third-party ODBC-based tools, legacy migration scripts, or older applications (originally built for SQL Server 2000/2005) that still embed {oj} syntax instead of proper LEFT OUTER JOIN / INNER JOIN keywords.

Step-by-Step Resolution Guide

Step 1: Identify the Offending View Definition

  • Open SQL Server Management Studio (SSMS) 21 or Azure Data Studio connected to your SQL Server 2025 instance.
  • Run the following query to extract the view’s definition and locate the ODBC escape pattern:
  SELECT OBJECT_DEFINITION(OBJECT_ID('YourSchema.YourViewName')) AS ViewDefinition;
  • Search the output text for the pattern {oj or { oj which indicates ODBC outer join escape syntax.

Step 2: Rewrite the Join Using ANSI Syntax

  • Replace any instance of {oj Table1 LEFT OUTER JOIN Table2 ON Table1.col = Table2.col} with standard ANSI syntax: Table1 LEFT OUTER JOIN Table2 ON Table1.col = Table2.col.
  • Remove all curly braces { } and the oj keyword entirely — SQL Server 2025 does not parse these inside schema-bound objects.
  • Save the corrected CREATE VIEW script in a .sql file for deployment via SSMS or sqlcmd.

Step 3: Drop and Recreate the View with Schema Binding

  • Execute DROP VIEW YourSchema.YourViewName; to remove the broken object.
  • Re-create the view using CREATE VIEW ... WITH SCHEMABINDING AS SELECT ... with the corrected ANSI join clause.
  • Ensure SET ANSI_NULLS ON and SET QUOTED_IDENTIFIER ON are present immediately before the CREATE VIEW statement, as schema-bound views strictly require these settings.

Step 4: Recreate the Clustered Index on the View

  • Run the original CREATE UNIQUE CLUSTERED INDEX statement that previously failed:
  CREATE UNIQUE CLUSTERED INDEX IX_YourView_Index 
  ON YourSchema.YourViewName (Column1, Column2);
  • Confirm the index builds successfully without triggering Error 10111 again.

Step 5: Audit Source Application/ETL Scripts

  • If the view was auto-generated by a linked ODBC data source, BI tool, or legacy ETL job, update the connection driver or export template so it stops emitting {oj} syntax in future deployments.
  • Check Event Viewer under Applications and Services Logs > Microsoft > Windows > ODBC on Windows Server 2025 for any driver-level warnings tied to the source application.

Alternative or Verification Steps

  • Verify the fix by querying sys.indexes and sys.views to confirm the indexed view exists and is marked as schema-bound: SELECT is_schema_bound FROM sys.sql_modules WHERE object_id = OBJECT_ID('YourViewName'); (should return 1).
  • If rewriting the join manually isn’t feasible due to a dynamically generated view, consider wrapping the ODBC-generated SELECT inside a new ANSI-compliant view layer rather than indexing the original object directly.

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

Troubleshooting Guide: SQL Server Error 10108

Why This Error Happens

Error 10108 occurs when a user or application attempts to create an index, statistic, or trigger on a view that internally references a SQL Server system table (internal metadata object) rather than standard user tables. This typically happens when a view is built on top of catalog views, dynamic management views (DMVs), or system tables that SQL Server protects from direct schema modification. The engine blocks this action because internal tables are managed exclusively by the database engine and are not designed to support user-defined indexing or triggers, which could corrupt internal consistency.

Step-by-Step Resolution Guide

Step 1: Identify the Offending View Definition

  • Run sp_helptext 'YourViewName' in SQL Server Management Studio (SSMS) to inspect the view’s underlying query.
  • Look for references to system tables (e.g., sys.sysobjects, sys.sysindexes, or other sys.* internal tables) rather than user-facing catalog views like sys.objects or sys.indexes.
  • Note the exact object name mentioned in the error message (the %.*ls placeholder) to confirm which view triggered the error.

Step 2: Rewrite the View to Avoid Internal Tables

  • Modify the view definition to use supported system catalog views (e.g., replace sys.sysindexes with sys.indexes, or sys.sysobjects with sys.objects).
  • Use ALTER VIEW YourViewName AS SELECT ... FROM sys.objects ... to update the definition with compliant objects.
  • Avoid referencing deprecated compatibility views that map directly to internal structures.

Step 3: Remove or Recreate Unsupported Indexes/Triggers

  • Drop any indexed view attempt using DROP INDEX IndexName ON YourViewName.
  • If a trigger was being applied, use DROP TRIGGER TriggerName to remove it before reapplying logic through application-side code instead.
  • Re-run the CREATE INDEX or CREATE TRIGGER statement only after confirming the view no longer touches internal tables.

Step 4: Update Compatibility Level (If Using Legacy Views)

  • Check the database compatibility level via SELECT compatibility_level FROM sys.databases WHERE name = 'YourDatabase'.
  • If running in an older compatibility mode (pre-SQL Server 2016), run ALTER DATABASE YourDatabase SET COMPATIBILITY_LEVEL = 160 (or the appropriate 2025-supported level) to ensure modern catalog views are used by default in auto-generated queries.

Alternative or Verification Steps

  • Verify the fix by re-executing the original CREATE INDEX or CREATE TRIGGER statement; it should complete without raising Error 10108.
  • If the error persists, use SELECT * FROM sys.sql_expression_dependencies WHERE referencing_id = OBJECT_ID('YourViewName') to confirm no hidden dependencies still point to internal system tables.

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

Troubleshooting Guide: SQL Server Error 10109

Why This Error Happens

Error 10109 occurs because SQL Server’s indexed view engine requires a deterministic, schema-bound reference to physical base tables in order to build and maintain a clustered index. When a view’s SELECT statement references a derived table (a subquery in the FROM clause), SQL Server cannot resolve a stable, persistent data source for that portion of the result set, since derived tables are transient and exist only during query execution. Because indexed views rely on the Query Optimizer being able to track dependencies down to the base table/column level for automatic index maintenance, the presence of a derived table breaks this dependency chain and the CREATE INDEX statement fails.

Step-by-Step Resolution Guide

Step 1: Identify the Offending Derived Table

  • Open the view definition using sp_helptext '%.*ls' (replace with your view name) in SQL Server Management Studio (SSMS) on your Windows Server 2025 or Windows 11 instance.
  • Locate the subquery inside the FROM clause that is causing the derived table reference (e.g., FROM (SELECT ... ) AS DT).
  • Note which columns and aggregations are being pulled from that subquery, as you will need to restructure them.

Step 2: Refactor the Derived Table into a Join or CTE-Free Structure

  • Rewrite the derived table as a direct JOIN against the base table instead of nesting a SELECT inside the FROM clause.
  • If the derived table was performing aggregation, move that logic into the outer view’s GROUP BY clause directly against the base table columns.
  • If the view requires multi-step logic, consider splitting it into two separate schema-bound views and joining them, rather than using one view with an embedded derived table.
  • Ensure the SCHEMABINDING option remains intact after refactoring:
  ALTER VIEW dbo.YourViewName
  WITH SCHEMABINDING
  AS
  SELECT ...
  FROM dbo.BaseTable1 AS T1
  INNER JOIN dbo.BaseTable2 AS T2 ON T1.ID = T2.ID

Step 3: Validate Schema Binding and Base Table References

  • Confirm every table referenced in the view uses a two-part name (dbo.TableName), as SCHEMABINDING requires this.
  • Run sp_depends 'dbo.YourViewName' or query sys.sql_expression_dependencies to confirm the view now only depends on physical tables, not nested queries.
  • Remove any DISTINCT, TOP, UNION, OUTER JOIN, or subquery constructs that may still be indirectly causing a derived table reference elsewhere in the definition.

Step 4: Recreate the Unique Clustered Index

  • Once the view compiles cleanly without derived table references, attempt the index creation again:
  CREATE UNIQUE CLUSTERED INDEX IX_YourView_Clustered
  ON dbo.YourViewName (Column1, Column2);
  • Confirm there are no additional blocking errors (e.g., missing COUNT_BIG(*) for aggregate views, or non-deterministic functions).

Alternative or Verification Steps

  • After recreating the index, run SELECT OBJECT_ID('dbo.YourViewName', 'V') alongside sys.indexes to confirm the clustered index exists and is reported as valid/enabled.
  • If refactoring the derived table is not feasible due to complex business logic, consider abandoning the indexed view approach and instead use an indexed computed column, a materialized staging table refreshed via a scheduled job, or an Indexed/Materialized view alternative only on the base tables without any nested subqueries.

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

Troubleshooting Guide: SQL Server Error 10107 — Indexed View Referencing a Table Variable

Why This Error Happens

Error 10107 occurs because SQL Server does not allow indexed views (views with a unique clustered index) to reference table variables in their underlying query definition. This restriction exists because table variables are transient, session-scoped objects that lack the persistent statistics and schema binding guarantees required to maintain an index deterministically. Essentially, the view definition is attempting to combine two incompatible features: schema-bound indexing and a volatile, non-persistent data structure.

Step-by-Step Resolution Guide

Step 1: Identify the Offending View and Table Variable

  • Run the following query to locate the exact view name referenced in the error message: SELECT definition FROM sys.sql_modules WHERE object_id = OBJECT_ID('YourViewName');
  • Open the view definition in SQL Server Management Studio (SSMS) and search for DECLARE @TableVar within the CREATE VIEW statement or any referenced inline function.
  • Confirm the table variable is being joined or selected directly within the view body, as this is the specific trigger for Error 10107.

Step 2: Replace the Table Variable with a Temporary Table or Base Table

  • Since indexed views require deterministic, schema-bound references, you cannot use DECLARE @Table TABLE (...) inside the object.
  • Replace the table variable with a permanent base table or a Common Table Expression (CTE) if the logic allows it, as CTEs do not carry the same restriction.
  • If the data is static reference data, migrate it into a dedicated schema-bound table using CREATE TABLE dbo.ReferenceData (...) and update the view’s FROM clause to point to this new table.

Step 3: Remove the Index or Refactor the View Logic

  • If replacing the table variable is not feasible, you must abandon the indexing strategy on this specific view.
  • Execute DROP INDEX IX_IndexName ON dbo.YourViewName; to remove the unique clustered index causing the conflict.
  • Alternatively, move the table variable logic into a stored procedure that calls the view, rather than trying to bind the view directly to the volatile data.

Step 4: Recompile and Validate Schema Binding

  • After removing the table variable, ensure the view still has WITH SCHEMABINDING enabled in the syntax if you intend to re-apply the index.
  • Re-run the CREATE UNIQUE CLUSTERED INDEX command on the modified view to verify compatibility: CREATE UNIQUE CLUSTERED INDEX IDX_View ON dbo.YourViewName (ColumnName);
  • Check the Messages tab in SSMS to confirm the command completes without triggering Error 10107 again.

Alternative or Verification Steps

  • Verification: Query sys.indexes and join it with sys.objects to confirm the index status is now “Enabled” (is_disabled = 0) on the target view without errors.
  • Alternative: If the table variable is essential for performance (temp storage), consider using a local Temporary Table (#TempTable) in a separate pre-processing script, and rely on standard non-clustered indexes on the base tables instead of attempting to index the view itself.

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

Troubleshooting Guide: Error 10105 – Cannot Create Index on View Using OPENXML

Why This Error Happens

This error occurs because SQL Server 2025 does not support creating indexed (materialized) views on view definitions that reference the OPENXML rowset provider. Indexed views require deterministic, schema-bound expressions, and OPENXML is treated as a non-deterministic, runtime-dependent function since it relies on an in-memory XML document handle generated by sp_xml_preparedocument. Because SQL Server cannot persist or validate this handle consistently across index maintenance operations, it blocks the CREATE INDEX statement outright at the view level.

Step-by-Step Resolution Guide

Step 1: Identify the Offending View Definition

  • Run the following query to locate the view causing the issue:
  • SELECT OBJECT_DEFINITION(OBJECT_ID('YourSchema.YourViewName'));
  • Inspect the output for any usage of OPENXML(...) within the FROM clause or derived tables.
  • Confirm this is the view referenced in the Error 10105 message text (%.*ls).

Step 2: Remove OPENXML from the View Logic

  • Rewrite the view to use the native XML data type methods instead of OPENXML, such as .nodes(), .value(), or .query().
  • Example replacement pattern:
  • SELECT T.c.value('(Name)[1]', 'varchar(100)') AS Name FROM @xmlData.nodes('/Root/Row') AS T(c)
  • Save and execute the ALTER VIEW statement to update the view definition in place.

Step 3: Recreate the View Without OPENXML Dependency

  • Drop the existing view using DROP VIEW YourSchema.YourViewName; if an ALTER VIEW is not feasible due to structural changes.
  • Recreate the view with WITH SCHEMABINDING enabled, which is a prerequisite for indexing.
  • Ensure all base tables referenced are two-part named (e.g., dbo.TableName) as required for schema-bound views.

Step 4: Create the Unique Clustered Index

  • Once the view no longer references OPENXML, attempt the index creation again:
  • CREATE UNIQUE CLUSTERED INDEX IX_ViewName ON YourSchema.YourViewName (KeyColumn);
  • Verify the index creation completes without Error 10105 or related schema-binding errors (such as Error 1935).

Step 5: Validate Schema-Binding Compliance

  • Check that the view adheres to all other indexed view restrictions (no OUTER JOIN, no SUM on nullable expressions without ISNULL, deterministic functions only).
  • Use SELECT OBJECTPROPERTY(OBJECT_ID('YourViewName'), 'IsIndexable'); to confirm the view now returns a value of 1.

Alternative or Verification Steps

  • Run sys.indexes catalog view filtered by the view’s object_id to confirm the clustered index was successfully registered: SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID('YourSchema.YourViewName');
  • If rewriting away from OPENXML is not immediately feasible, use a standard (non-indexed) view or materialize the XML-parsed data into a persisted staging table via a scheduled job, then index that table instead.

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

Troubleshooting Guide: SQL Server Error 10106

Why This Error Happens

Error 10106 occurs when you attempt to create an indexed (materialized) view on a standard view that references an internal system rowset provider, such as views built on top of system catalog views, dynamic management views (DMVs), or certain linked server/OLE DB rowset providers. SQL Server’s indexed view engine requires deterministic, persistable base table data to maintain the clustered index, and internal system rowset providers do not expose the metadata needed to guarantee this determinism. This typically happens when a view indirectly joins against system objects (like sys.objects, sys.dm_* views, or OPENROWSET/OPENQUERY results) rather than purely user-defined base tables.

Step-by-Step Resolution Guide

Step 1: Identify the Offending View Definition

  • Run sp_helptext 'SchemaName.ViewName' in SSMS to inspect the full view definition.
  • Look specifically for references to system catalog views (sys.*), DMVs (sys.dm_*), INFORMATION_SCHEMA views, or external rowset functions like OPENROWSET, OPENQUERY, or OPENDATASOURCE.
  • Check nested views — the error can originate from a view-within-a-view that silently pulls in system metadata.

Step 2: Refactor the View to Remove System Rowset Dependencies

  • Rewrite the view so it only references standard user tables and persisted base tables, not system catalog or dynamic management objects.
  • If you need system metadata values (e.g., object IDs, row counts), pre-compute them into a regular user table via a scheduled job or stored procedure, then join to that user table instead.
  • Avoid wrapping the view around linked server queries or external OLE DB providers that return non-persistable rowsets.

Step 3: Create the Indexed View Correctly

  • Ensure the view is created WITH SCHEMABINDING.
  • Confirm all base tables referenced are regular disk-based tables owned by the same schema context.
  • Run the unique clustered index creation again:
CREATE UNIQUE CLUSTERED INDEX IX_ViewName_Clustered
ON SchemaName.ViewName (KeyColumn);

Step 4: Validate SET Options and Determinism Requirements

  • Verify the session creating the view had the required SET options enabled: ANSI_NULLS, QUOTED_IDENTIFIER, ANSI_PADDING, ANSI_WARNINGS, ARITHABORT, CONCAT_NULL_YIELDS_NULL, and NUMERIC_ROUNDABORT OFF.
  • Re-run sp_helptext on the corrected view to confirm no system rowset references remain before attempting index creation again.

Alternative or Verification Steps

  • To verify the fix, re-run the CREATE UNIQUE CLUSTERED INDEX statement against the revised view — success with no Error 10106 confirms the system rowset dependency has been eliminated.
  • If an indexed view is not strictly required, consider using a regular non-indexed view or converting the logic into a scheduled ETL job that materializes results into a physical staging table instead.

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

Troubleshooting Guide: SQL Server Error 10103 – “Cannot create %S_MSG on view because it uses OPENROWSET”

Why This Error Happens

This error occurs because SQL Server does not allow certain schema-bound or indexed operations (such as creating an index, statistics, or a schema-bound view) on top of a view that references OPENROWSET or OPENQUERY. Since OPENROWSET pulls data dynamically from an external source at runtime, SQL Server cannot validate or bind a fixed schema to it, which is a strict requirement for the object you are trying to create. This is a design limitation rather than a bug, and it typically surfaces when a view wraps an ad hoc distributed query and a developer later attempts to index it or create a dependent schema-bound object.

Step-by-Step Resolution Guide

Step 1: Identify the Offending View Definition

  • Run sp_helptext 'YourViewName' in SQL Server Management Studio (SSMS) connected to your SQL Server 2025 instance.
  • Confirm whether the view definition contains OPENROWSET(...) or OPENQUERY(...) calls.
  • Note the exact line where the external data source is referenced.

Step 2: Remove the Schema-Binding or Indexing Attempt

  • Edit the view and remove the WITH SCHEMABINDING clause if present, since schema-bound views cannot reference non-deterministic or external data sources.
  • If you were attempting CREATE INDEX or CREATE STATISTICS on this view, cancel that operation — it is not supported on views containing OPENROWSET.
  • Example fix:
ALTER VIEW dbo.YourView
AS
SELECT * FROM OPENROWSET('SQLNCLI', 'Server=...;Trusted_Connection=yes;', 'SELECT * FROM SomeTable')

(Do not add WITH SCHEMABINDING above AS.)

Step 3: Materialize the External Data Instead

  • Create a staging table and insert the OPENROWSET results into it using INSERT INTO ... SELECT.
  • Build your schema-bound view or index on top of this new physical staging table instead of the live OPENROWSET call.
  • Example:
SELECT * INTO dbo.StagingTable
FROM OPENROWSET('SQLNCLI', 'Server=...;Trusted_Connection=yes;', 'SELECT * FROM SomeTable');

Step 4: Validate Ad Hoc Distributed Queries Configuration

  • Open SSMS and run sp_configure 'show advanced options', 1; RECONFIGURE; followed by sp_configure 'Ad Hoc Distributed Queries', 1; RECONFIGURE; to ensure the feature is enabled (required for OPENROWSET to function at all).
  • Restart the SQL Server 2025 service via services.msc on Windows Server 2025 / Windows 11 if configuration changes were made.

Step 5: Re-Deploy the View

  • Drop and recreate the view without the unsupported schema-binding or indexing directive.
  • Re-run your deployment or migration script to confirm Error 10103 no longer appears.

Alternative or Verification Steps

  • Verify the fix by attempting to create the index/schema-bound object again — if no error 10103 appears in the SSMS “Messages” tab, the issue is resolved.
  • If you still need indexed performance on OPENROWSET data, use an indexed view on the staging table instead, or convert the process into a scheduled ETL job (SQL Server Agent job or SSIS package) that refreshes the staging table on a regular interval.

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

Troubleshooting Guide: Error 10104 — Indexed View Contains CONTAINSTABLE or FREETEXTTABLE Reference

Why This Error Happens

This error occurs because SQL Server does not allow indexed views (views with a unique clustered index) to reference full-text query functions such as CONTAINSTABLE or FREETEXTTABLE. These functions are non-deterministic in the context of indexed view maintenance because full-text catalogs are updated asynchronously and cannot guarantee the deterministic row-matching behavior required for materialized view indexes. As a result, SQL Server 2025 blocks the CREATE INDEX operation on the view to preserve data integrity and consistency.

Step-by-Step Resolution Guide

Step 1: Identify the Offending View and Query Logic

  • Open SQL Server Management Studio (SSMS) and locate the view definition using sp_helptext 'YourViewName';
  • Search the view’s SELECT statement for CONTAINSTABLE(...) or FREETEXTTABLE(...) usage, typically found in JOIN or WHERE clauses.
  • Confirm the exact table and column referenced by the full-text function, as this will guide your redesign approach.

Step 2: Remove or Refactor the Full-Text Function from the View

  • Edit the view using ALTER VIEW to eliminate direct references to CONTAINSTABLE or FREETEXTTABLE.
  • If full-text search is required, move the full-text logic into a separate query that joins against the view at runtime instead of embedding it inside the indexed view itself.
  • Example: Rewrite queries to call CONTAINSTABLE externally, like:
  SELECT v.* 
  FROM dbo.YourView v
  INNER JOIN CONTAINSTABLE(dbo.YourTable, YourColumn, 'SearchTerm') AS ft 
  ON v.PrimaryKey = ft.[KEY];

Step 3: Recreate the Indexed View Without Full-Text Dependencies

  • Run DROP VIEW YourViewName; if the view already exists in a broken state.
  • Recreate the view using CREATE VIEW with SCHEMABINDING enabled and without any full-text function references.
  • Re-apply the unique clustered index:
  CREATE UNIQUE CLUSTERED INDEX IX_YourView_PK 
  ON dbo.YourViewName (PrimaryKeyColumn);

Step 4: Validate SQL Server and Full-Text Service Configuration

  • On Windows Server 2025, confirm the SQL Server Full-Text Filter Daemon Launcher service is running via services.msc.
  • Check that the full-text catalog path (default: C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\FTData) is not corrupted or inaccessible.
  • Restart the SQL Server instance if full-text catalogs were recently rebuilt, using net stop MSSQLSERVER followed by net start MSSQLSERVER.

Alternative or Verification Steps

  • Verify the fix by re-running CREATE UNIQUE CLUSTERED INDEX on the view; if Error 10104 no longer appears, the view is now eligible for indexing.
  • If full-text search integration is still required for performance reasons, consider using a persisted computed column combined with a standard (non-full-text) index instead of relying on an indexed view.

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

Troubleshooting Guide: Error 10101 – Cannot Create Index on View Containing TOP or OFFSET

Why This Error Happens

This error occurs because SQL Server’s indexed view engine requires deterministic, order-independent result sets, but the TOP and OFFSET clauses inherently depend on row ordering and limiting logic that cannot be reliably materialized into an index. When SQL Server attempts to build a unique clustered index on a view, it validates the view’s SELECT statement against a strict set of requirements, and the presence of TOP or OFFSET immediately fails this validation since the indexing engine cannot guarantee consistent row selection across data modifications. This is a design limitation by SQL Server, not a bug, corruption, or permissions issue—it’s a structural incompatibility between the view definition and the indexing feature.

Step-by-Step Resolution Guide

Step 1: Identify the Offending View Definition

  • Open SQL Server Management Studio (SSMS) and locate the view referenced in the error message (the %.*ls placeholder will show the actual view name).
  • Run sp_helptext 'YourViewName' in a query window to view the full CREATE VIEW script.
  • Look specifically for TOP (n), TOP (n) PERCENT, or OFFSET...FETCH NEXT clauses in the SELECT statement.

Step 2: Modify the View to Remove TOP or OFFSET

  • Edit the view definition using ALTER VIEW YourViewName in SSMS or Azure Data Studio.
  • Remove the TOP or OFFSET/FETCH clause entirely from the underlying query.
  • If row-limiting logic is required for business purposes, move it to the calling query (e.g., SELECT TOP 10 * FROM YourView ORDER BY ColumnName) instead of embedding it in the view itself.
  • Save and execute the ALTER VIEW statement to update the view schema.

Step 3: Recreate the Indexed View

  • Run CREATE UNIQUE CLUSTERED INDEX IX_ViewName ON YourViewName (KeyColumn) once the TOP/OFFSET clause has been removed.
  • Ensure the view still meets other indexed view requirements, such as using SCHEMABINDING, deterministic functions, and no outer joins.
  • Confirm there are no additional nested views or subqueries that also contain TOP or OFFSET.

Step 4: Validate Dependent Objects

  • Check for stored procedures, functions, or application queries (via sys.sql_expression_dependencies) that relied on the original TOP/OFFSET behavior in the view.
  • Update any dependent code to apply row-limiting logic externally, as described in Step 2.

Alternative or Verification Steps

  • Verify the fix by running SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID('YourViewName') to confirm the index was created successfully without errors.
  • If row-limiting is a hard requirement at the view level, consider using a table-valued function with TOP/OFFSET instead of an indexed view, since functions are not subject to the same indexing restrictions.

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

Troubleshooting Guide: Error 10102 – Cannot Create Index on View Containing TABLESAMPLE Clause

Why This Error Happens

This error occurs because SQL Server 2025 does not support creating indexed views (materialized views) on view definitions that include the TABLESAMPLE clause. The TABLESAMPLE clause returns a non-deterministic subset of rows from a table, which conflicts with the core requirement of indexed views that the underlying result set must be deterministic and reproducible. Since SQL Server needs to maintain a persisted, consistent copy of the view’s data in the unique clustered index, any randomness introduced by TABLESAMPLE makes this impossible to guarantee.

Step-by-Step Resolution Guide

Step 1: Identify the Offending View Definition

  • Open SQL Server Management Studio (SSMS) and connect to your SQL Server 2025 instance.
  • Run the following query to locate the view causing the issue:
SELECT definition FROM sys.sql_modules WHERE object_id = OBJECT_ID('YourViewName');
  • Look specifically for the TABLESAMPLE keyword within the FROM clause of the view script.

Step 2: Remove the TABLESAMPLE Clause from the View

  • Since indexed views require deterministic data, you must alter the view to remove the sampling logic.
  • Use ALTER VIEW to rewrite the definition without TABLESAMPLE:
ALTER VIEW dbo.YourViewName
WITH SCHEMABINDING
AS
SELECT Column1, Column2
FROM dbo.YourTable; -- TABLESAMPLE clause removed
  • Ensure WITH SCHEMABINDING is included, as this is a mandatory prerequisite for creating an index on a view, separate from the TABLESAMPLE issue.

Step 3: Re-attempt the Index Creation

  • Once the view definition is clean, run the CREATE INDEX command again to create the unique clustered index required for the materialized view.
  • Example syntax:
CREATE UNIQUE CLUSTERED INDEX IDX_View_Unique 
ON dbo.YourViewName (Column1);
  • Verify the command completes without throwing Error 10102.

Step 4: Implement Sampling Logic Outside the View (If Required)

  • If you specifically needed TABLESAMPLE for performance testing or data science sampling, do not use an indexed view for this purpose.
  • Instead, create a standard (non-indexed) view with TABLESAMPLE, or move the sampling logic into a stored procedure or ad-hoc query executed against the base table directly.

Alternative or Verification Steps

  • Verification: Check the sys.indexes catalog view to confirm the new index exists and is valid by running SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID('YourViewName');.
  • Alternative: If deterministic sampling is a hard requirement, consider using a WHERE clause based on a modulo operation on a deterministic key (e.g., WHERE RowID % 10 = 0) instead of TABLESAMPLE, as this approach remains compatible with schema-bound indexed views.

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

Troubleshooting Guide: Error 10100 – Cannot Create Index on View Containing DISTINCT

Why This Error Happens

SQL Server requires indexed views to produce a strictly deterministic and reproducible row set, and the DISTINCT keyword interferes with the engine’s ability to track exact row duplication counts needed for incremental index maintenance. Specifically, when DISTINCT collapses duplicate rows, SQL Server loses the ability to map each row in the view back to its exact contributing base table rows, which is mandatory for maintaining a clustered index on that view. This restriction is a hard architectural limitation (not a bug), so the view’s T-SQL definition must be rewritten to avoid DISTINCT while still logically removing duplicates.

Step-by-Step Resolution Guide

Step 1: Identify the Offending View Definition

  • Run sp_helptext 'YourViewName' in SQL Server Management Studio (SSMS) to pull the exact view script.
  • Locate the DISTINCT keyword in the SELECT statement — this is the direct trigger for Error 10100.
  • Confirm this is the view you intended to index by checking sys.indexes and sys.views for the object ID.

Step 2: Rewrite the View Using GROUP BY Instead of DISTINCT

  • Replace SELECT DISTINCT col1, col2 FROM dbo.TableName with SELECT col1, col2 FROM dbo.TableName GROUP BY col1, col2.
  • If the original query involved aggregates, ensure COUNT_BIG(*) is included in the SELECT list — this is a mandatory requirement for indexed views with grouping.
  • Save the updated view using ALTER VIEW dbo.YourViewName WITH SCHEMABINDING AS ... to enforce schema binding, which is also required before indexing.

Step 3: Recreate the Unique Clustered Index

  • Execute the index creation statement again, for example:
  • CREATE UNIQUE CLUSTERED INDEX IX_YourView_Unique ON dbo.YourViewName (col1, col2);
  • Verify the view still has WITH SCHEMABINDING set, since the index creation will fail separately if schema binding was dropped during edits.

Step 4: Validate Base Table Compatibility

  • Check that all base tables referenced in the view are using two-part naming (dbo.TableName), not just TableName, as schema-bound views require explicit schema references.
  • Confirm no TOP, UNION, OUTER JOIN, or subqueries exist in the view, as these are also incompatible with indexed views in SQL Server 2025.
  • Re-run sp_helptext once more to confirm the final definition is clean before attempting the index creation again.

Alternative or Verification Steps

  • Run SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID('dbo.YourViewName') to confirm the clustered index now exists successfully.
  • If rewriting with GROUP BY is not feasible for your business logic, consider not indexing the view at all and instead rely on a standard non-indexed view or an indexed computed column on the base table as a workaround.

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

Troubleshooting Guide: SQL Server Error 10087 — “The provider did not release some of the existing rows”

Why This Error Happens

This error typically occurs during distributed query execution or linked server operations when the OLE DB provider fails to properly release row handles back to SQL Server after a fetch operation completes. It is most commonly caused by an outdated, misconfigured, or corrupted OLE DB provider driver, or by the provider running out of allocated memory/resources while holding row handles open. In some cases, this also surfaces due to improper cursor handling settings or concurrency conflicts between the provider and SQL Server 2025’s updated Row Handle Manager.

Step-by-Step Resolution Guide

Step 1: Update or Reinstall the OLE DB Provider

  • Navigate to Control Panel > Programs > Programs and Features on Windows Server 2025 / Windows 11 and check the version of the OLE DB provider (e.g., MSOLEDBSQL, Oracle Provider for OLE DB, or third-party provider).
  • Download the latest provider version compatible with SQL Server 2025 from the official vendor source.
  • Uninstall the old provider completely, restart the server, then install the updated version.

Step 2: Reconfigure Linked Server Provider Options

  • Open SQL Server Management Studio (SSMS) and connect to the instance throwing Error 10087.
  • Go to Server Objects > Linked Servers > [Your Linked Server] > Properties > Provider Options.
  • Disable “Nested Queries” and enable “Allow InProcess” only if the provider is known to be thread-safe.
  • Run the following T-SQL to verify provider settings:
EXEC sp_linkedservers;
EXEC master.dbo.sp_serveroption 'YourLinkedServerName', 'collation compatible', 'false';

Step 3: Clear Cached Row Handles and Restart Services

  • Open Services.msc and restart the SQL Server (MSSQLSERVER) service along with SQL Server Agent.
  • Clear any stale OLE DB connection pools by running:
EXEC sp_reset_connection;
DBCC FREEPROCCACHE;
  • Check the SQL Server Error Log located at C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Log\ERRORLOG for confirmation that the provider initialized cleanly on restart.

Step 4: Adjust Cursor and Memory Allocation Settings

  • In SSMS, right-click the server instance, go to Properties > Advanced, and verify the Cursor Threshold and Max Server Memory values are not set too restrictively (recommended: leave at least 20% of system RAM free for OLE DB operations).
  • Apply changes and restart the SQL Server service for settings to take effect.

Alternative or Verification Steps

  • Run a test distributed query against the linked server (e.g., SELECT * FROM OPENQUERY(YourLinkedServer, 'SELECT TOP 10 * FROM dbo.TestTable')) and confirm it completes without throwing Error 10087.
  • If the error persists, switch the linked server provider type (e.g., from the legacy provider to MSOLEDBSQL19 or ODBC Driver 18) as a workaround, since some third-party providers remain incompatible with SQL Server 2025’s updated row-release protocol.

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

Troubleshooting Guide: SQL Server Error 10088 – Column Order Not Specified in Rowset

Why This Error Happens

This error occurs when a linked server query or OLE DB provider executes a distributed query using a loosely defined SELECT * statement or a result set where explicit column ordering is not enforced by the originating object (such as a view or remote table). Because the OLE DB provider cannot guarantee column order on the first fetch, it is forced to silently reissue (reexecute) the command to realign the cursor to its initial position, which generates Error 10088 as an informational warning. This is commonly triggered by outdated or non-compliant OLE DB/ODBC drivers communicating between SQL Server 2025 and a legacy linked server source on Windows Server 2025 or Windows 11.

Step-by-Step Resolution Guide

Step 1: Update the OLE DB Provider or ODBC Driver

  • Navigate to Control Panel > ODBC Data Sources (64-bit) on the Windows Server 2025/Windows 11 host.
  • Verify the driver version for the linked server connection (e.g., SQL Server Native Client, MSOLEDBSQL, or third-party providers like Oracle/ODBC for DB2).
  • Download and install the latest Microsoft OLE DB Driver for SQL Server (MSOLEDBSQL 19+) from the official Microsoft Download Center.
  • Restart the SQL Server (MSSQLSERVER) service via services.msc after installation.

Step 2: Explicitly Define Column Names in Queries

  • Locate the stored procedure, view, or distributed query causing the error (often involving OPENQUERY or four-part naming conventions).
  • Replace any instance of SELECT * FROM LinkedServer...TableName with explicit column names:
  SELECT ColumnA, ColumnB, ColumnC 
  FROM OPENQUERY(LinkedServerName, 'SELECT ColumnA, ColumnB, ColumnC FROM RemoteTable')
  • Save and redeploy the modified stored procedure or query script.

Step 3: Adjust Linked Server Provider Options

  • Open SQL Server Management Studio (SSMS) and connect to the instance.
  • Go to Server Objects > Linked Servers, right-click the specific linked server, and select Properties.
  • Under the Provider Options tab, ensure “Nested Queries” and “Use Remote Collation” are checked, and verify “Dynamic Parameters” is enabled if the source supports it.
  • Click OK and test the connection via right-click > Test Connection.

Step 4: Clear and Rebuild the Query Cache

  • Execute the following T-SQL command in SSMS to clear potentially corrupted execution plans related to the linked server query:
  DBCC FREEPROCCACHE;
  • Re-run the original query or job that triggered Error 10088 to force a clean execution plan generation.

Alternative or Verification Steps

  • To verify the fix, run the query in SSMS with “Include Actual Execution Plan” enabled; a successful fix will show a single execution node rather than a “Remote Query” rebind warning.
  • If the error persists, bypass the OLE DB provider entirely by migrating the linked server connection to a Linked Server using SQL Server Native Client or converting the logic to a SSIS (SQL Server Integration Services) data flow task instead of a direct T-SQL distributed query.

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

Troubleshooting Guide: SQL Server Error 10085 – “RestartPosition on the table was canceled during notification”

Why This Error Happens

This error is generated by SQL Server’s Query Notification / Service Broker-based change tracking mechanism (often tied to SqlDependency or SqlNotificationRequest) when the underlying subscription is invalidated before the notification can be delivered. The most common root cause is that the table schema was altered, the connection was dropped, or Service Broker was disabled/stopped while a notification subscription was still active and monitoring that table. It can also occur due to corrupted Service Broker queues, conversation timeouts, or insufficient permissions on the SUBSCRIBE QUERY NOTIFICATIONS database permission for the executing login.

Step-by-Step Resolution Guide

Step 1: Verify Service Broker Is Enabled on the Database

  • Run the following query to check Service Broker status: SELECT name, is_broker_enabled FROM sys.databases WHERE name = 'YourDatabaseName';
  • If is_broker_enabled returns 0, enable it with: ALTER DATABASE YourDatabaseName SET ENABLE_BROKER;
  • On Windows Server 2025/Windows 11 hosts, ensure no pending database backup or restore operations are locking the database when you run this command, as ENABLE_BROKER can hang if there are open transactions.

Step 2: Check and Repair SUBSCRIBE QUERY NOTIFICATIONS Permissions

  • Confirm the application’s SQL login has the correct permission: GRANT SUBSCRIBE QUERY NOTIFICATIONS TO [YourAppLogin];
  • Inspect sys.transmission_queue and sys.conversation_endpoints for orphaned or errored conversations tied to the notification queue.
  • If you find stuck conversations, end them manually: END CONVERSATION 'conversation_handle_guid' WITH CLEANUP;

Step 3: Clear and Reset Stale Query Notification Subscriptions

  • Stop the application or service generating the SqlDependency/SqlNotificationRequest calls temporarily.
  • Drop and recreate the Service Broker queue and service associated with notifications: DROP SERVICE [YourNotificationService]; DROP QUEUE [YourNotificationQueue]; then recreate them using your original deployment script.
  • Restart the SQL Server Service Broker task via: ALTER DATABASE YourDatabaseName SET DISABLE_BROKER; ALTER DATABASE YourDatabaseName SET ENABLE_BROKER; — this forces a clean restart of the broker task handling restart positions.

Step 4: Validate Underlying Table Schema Stability

  • Ensure no DDL changes (ALTER TABLE, index rebuilds with schema modification, etc.) are occurring on the monitored table while notifications are active, as any schema change immediately invalidates and cancels the subscription (triggering Error 10085 by design).
  • If schema changes are required, re-issue the SqlDependency/notification subscription immediately after the DDL operation completes.

Step 5: Check SQL Server and OS-Level Event Logs

  • Open Event Viewer on Windows Server 2025 / Windows 11 and navigate to Applications and Services Logs > MSSQLSERVER to correlate Error 10085 with any Service Broker (Error 9617) or network-related errors (Error 64, 10053) occurring at the same timestamp.
  • Cross-reference with the SQL Server error log located at C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Log\ERRORLOG to identify if broker transport failures are the underlying trigger.

Alternative or Verification Steps

  • To verify the fix, re-run your application’s notification subscription and monitor sys.dm_qn_subscriptions to confirm the subscription remains in an active state without being dropped after a few minutes.
  • If the error persists, as an alternative, switch from classic Query Notifications to SQL Server Change Tracking or Change Data Capture (CDC), which are more resilient on SQL Server 2025 and avoid the Service Broker notification cancellation issue entirely.

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

Troubleshooting Guide: SQL Server Error 10086 – “Table Built Over a Live Data Stream, Position Cannot Be Restarted”

Why This Error Happens

This error typically occurs when SQL Server 2025’s native streaming table engine loses its checkpoint reference to the underlying live data stream source, often due to an interrupted connection or an expired stream offset window. It can also happen if the stream-backed table was created with WITH (STREAMING_SOURCE) options but the upstream provider (such as Event Hubs, Kafka integration, or a Change Data Capture feed) rotated or purged its log segment before SQL Server committed its last read position. Additionally, corrupted metadata in the sys.streaming_table_offsets system view or insufficient permissions on the stream endpoint can prevent the engine from resuming at the last known position.

Step-by-Step Resolution Guide

Step 1: Verify the Streaming Source Connection and Credentials

  • Confirm the service account running SQL Server has active network access to the streaming endpoint (check firewall rules on Windows Server 2025 / Windows 11 for outbound port blocks).
  • Run SELECT * FROM sys.dm_streaming_source_status; to check if the connection state is DISCONNECTED or EXPIRED.
  • Re-validate credentials stored in the DATABASE SCOPED CREDENTIAL used by the streaming table definition.

Step 2: Inspect and Reset the Stream Offset Metadata

  • Query the current checkpoint using SELECT * FROM sys.streaming_table_offsets WHERE table_name = 'YourTableName';
  • If the offset is null or references a purged segment, reset it manually with:
    EXEC sp_reset_streaming_offset 'YourTableName', 'EARLIEST';
  • Use 'EARLIEST' or 'LATEST' depending on whether historical replay or fresh ingestion is required.

Step 3: Rebuild the Streaming Table Definition

  • Drop and recreate the table using DROP TABLE YourTableName; followed by the original CREATE TABLE ... WITH (STREAMING_SOURCE = ...) script.
  • Ensure the RETENTION_PERIOD and CHECKPOINT_INTERVAL parameters match the upstream provider’s log retention policy to avoid future offset expiration.
  • Restart the SQL Server Streaming Engine service via PowerShell: Restart-Service MSSQLSTREAMENGINE.

Step 4: Check Windows Event Viewer for Correlated Errors

  • Navigate to Event Viewer > Applications and Services Logs > Microsoft > SQL Server > Streaming.
  • Look for related Event IDs (such as 10082 or 10084) that may indicate the root cause (e.g., authentication timeout or network drop).

Alternative or Verification Steps

  • After applying the fix, run SELECT TOP 10 * FROM YourTableName ORDER BY ingestion_time DESC; to confirm new data is flowing in without errors.
  • If the issue persists, configure the table with FALLBACK_MODE = BATCH as a temporary workaround to switch from live streaming ingestion to scheduled batch polling until the stream source stabilizes.

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

Troubleshooting Guide: SQL Server Error 10081 – “Rowset Uses Integrated Indexes and There Is No Current Index”

Why This Error Happens

This error typically occurs when the OLE DB provider or SQL Server’s storage engine attempts to access a rowset through an index-based cursor, but the underlying table’s index metadata has become corrupted, is missing, or was dropped/rebuilt mid-operation. It can also surface when a linked server query or distributed transaction references a table that lacks a usable clustered or non-clustered index at the exact moment the cursor is opened. In most cases, this points to either index corruption, a race condition during concurrent schema changes (like index rebuilds), or an incompatibility between the OLE DB provider version and SQL Server 2025 on Windows Server 2025/Windows 11.

Step-by-Step Resolution Guide

Step 1: Verify Index Integrity on the Affected Table

  • Open SQL Server Management Studio (SSMS) and connect to the instance reporting the error.
  • Run DBCC CHECKTABLE('YourTableName') WITH ALL_ERRORMSGS; to check for corruption.
  • Review output for allocation errors or missing index pages; note any error numbers returned alongside 10081.

Step 2: Rebuild or Recreate the Missing/Corrupted Index

  • Identify the index in question using sys.indexes and sys.dm_db_index_physical_stats.
  • Run the following to rebuild: ALTER INDEX ALL ON YourTableName REBUILD;
  • If the index was dropped unintentionally, recreate it manually using the original index definition from your schema backup or sys.index_columns metadata.

Step 3: Update or Reconfigure the OLE DB Provider

  • Navigate to Control Panel > Programs > Microsoft OLE DB Driver for SQL Server and confirm the installed version supports SQL Server 2025.
  • If outdated, download and install the latest MSOLEDBSQL driver from the official Microsoft Download Center.
  • Restart the SQL Server service via services.msc or run Restart-Service MSSQLSERVER in PowerShell (elevated).

Step 4: Check for Concurrent Schema Changes

  • Query sys.dm_exec_requests and sys.dm_tran_locks to confirm no other session is rebuilding or dropping indexes on the same table.
  • If found, serialize index maintenance jobs using SQL Server Agent to avoid overlapping operations.

Step 5: Restore from Backup if Corruption Persists

  • If DBCC CHECKTABLE reports unrepairable corruption, restore the affected table/database from the last known good backup.
  • Use RESTORE DATABASE YourDB FROM DISK = 'BackupPath' WITH REPLACE; in a maintenance window.

Alternative or Verification Steps

  • Re-run the original query or application process that triggered Error 10081 to confirm the rowset now resolves without exception.
  • If the error persists, run DBCC CHECKDB('YourDatabase') WITH NO_INFOMSGS; for a full database-level corruption scan, and consider engaging Microsoft Support if hardware-level disk corruption is suspected.

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

Troubleshooting Guide: SQL Server Error 10068 — “Consumer Could Not Delete the Row”

Why This Error Happens

Error 10068 occurs when an OLE DB consumer attempts to delete a row through a rowset that is using an asynchronous or deferred update mode, and the underlying provider has not yet committed the previous operation before the new delete request arrives. This typically stems from a cursor concurrency conflict, a row that is locked by another pending transaction, or a corrupted/stale cached rowset in a linked server connection. It is also frequently triggered by misconfigured OLE DB provider settings (such as DBPROP_CHANGEINSERTEDROWS or IRowsetChange implementation issues) on Windows Server 2025 when communicating with legacy or third-party data providers.

Step-by-Step Resolution Guide

Step 1: Verify Row-Level Locking and Pending Transactions

  • Open SQL Server Management Studio (SSMS) and run sp_who2 or query sys.dm_tran_locks to check for blocking sessions on the target table.
  • Identify any long-running or orphaned transactions holding an exclusive lock on the row you are trying to delete.
  • If a blocking session is found, terminate it using KILL <session_id> only after confirming it is safe to do so.

Step 2: Reset the Linked Server or OLE DB Provider Cache

  • Navigate to SQL Server Management Studio > Server Objects > Linked Servers and right-click the relevant linked server.
  • Select Properties and verify that the OLE DB provider options for “Allow InProcess” and “Dynamic Parameters” are correctly enabled.
  • Run EXEC sp_testlinkedserver 'YourLinkedServerName'; to refresh the connection cache.
  • Restart the SQL Server service via services.msc or run net stop MSSQLSERVER && net start MSSQLSERVER in an elevated PowerShell prompt.

Step 3: Update or Reconfigure the OLE DB/ODBC Driver

  • Confirm the provider version under C:\Program Files\Microsoft SQL Server\160\DTS\Connections\ or the relevant driver install path.
  • Download and install the latest Microsoft OLE DB Driver for SQL Server compatible with Windows Server 2025 / Windows 11.
  • Reconfigure the connection string to explicitly set Use Procedure for Prepare=0 and disable asynchronous row fetching if supported.

Step 4: Rebuild the Affected Rowset/Cursor

  • Drop and recreate the client-side cursor or ADO/OLE DB recordset object in the consuming application.
  • Ensure the application code closes the previous Recordset or Rowset object fully (rs.Close(); rs = Nothing;) before issuing a new delete command.
  • Re-run the delete operation in a fresh session to confirm the pending state has cleared.

Alternative or Verification Steps

  • Run the delete statement directly in SSMS against the target row to confirm whether the issue is isolated to the OLE DB consumer application or the database engine itself.
  • If the error persists, enable SQL Server Profiler or Extended Events to trace the exact transaction sequence and pinpoint which process is holding the row in a pending state.

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

Why This Error Happens

Error 10069 occurs when the SQL Server replication Distribution Agent attempts to synchronize a DELETE operation against a heterogeneous (non-SQL Server) subscriber—typically an ODBC or OLE DB data source such as Oracle, Access, or a legacy ISAM file—but the underlying row has already been removed, locked, or modified outside the replication transaction. This usually stems from a loss of referential sync between the Publisher and Subscriber, missing primary key/unique constraints on the destination table, or the OLE DB consumer driver lacking the necessary write/delete permissions on the target data source. In Windows Server 2025/Windows 11 environments, this is frequently compounded by updated OLE DB driver versions that enforce stricter transactional isolation than the replication agent expects.

Step-by-Step Resolution Guide

Step 1: Verify Subscriber Table Integrity and Keys

  • Confirm the destination table at the Subscriber has a valid primary key or unique index matching the Publisher’s schema.
  • Run sp_helpindex 'TableName' at the Subscriber to check for missing constraints.
  • If keys are missing, recreate them to match the Publisher article definition.

Step 2: Check OLE DB/ODBC Driver Permissions

  • Open ODBC Data Source Administrator (64-bit) on Windows Server 2025 and locate the DSN used by the Distribution Agent.
  • Ensure the service account running the SQL Server Agent (NT SERVICE\SQLSERVERAGENT or custom domain account) has read/write/delete rights on the target database or file path (e.g., C:\Data\LegacyDB.accdb).
  • Test the connection string manually using sqlcmd -S <server> -d <db> -U <user> -P <pass> or the driver’s built-in “Test Connection” button.

Step 3: Reinitialize the Subscription

  • In SQL Server Management Studio (SSMS), navigate to Replication > Local Subscriptions.
  • Right-click the affected subscription and select Reinitialize Subscription to force a fresh snapshot and clear orphaned delete commands.
  • Run the Snapshot Agent and Distribution Agent jobs manually via SQL Server Agent to confirm clean application of commands.

Step 4: Review and Adjust Conflict Resolution Settings

  • Open the Publication Properties and check the Subscription Options tab.
  • Set “If the delete fails at the Subscriber” behavior to Ignore and continue (under Distribution Agent profile settings, -SkipErrors 10069) if occasional out-of-sync deletes are expected and non-critical.
  • Save changes and restart the Distribution Agent job.

Step 5: Update OLE DB Provider and Drivers

  • Ensure the OLE DB provider (e.g., Microsoft OLE DB Driver for Oracle, or Access Database Engine) is updated to the latest version compatible with Windows Server 2025/Windows 11.
  • Restart the SQL Server Agent service after installing driver updates: net stop SQLSERVERAGENT && net start SQLSERVERAGENT.

Alternative or Verification Steps

  • Monitor the Replication Monitor console for the affected publication over 24 hours to confirm Error 10069 no longer appears in the Distribution Agent history.
  • If the error persists, drop and recreate the subscription entirely rather than reinitializing, as corrupted metadata in MSreplication_subscriptions may require a full rebuild.

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

Troubleshooting Guide: Error 10066 – DBPROP_MAXPENDINGROWS Exceeded

Why This Error Happens

This error occurs when the OLE DB provider used in a batch update or rowset operation accumulates more modified rows than the threshold defined by the DBPROP_MAXPENDINGROWS property allows. It typically happens during large bulk insert, update, or linked server operations in SQL Server 2025 where the client application or provider is not committing changes frequently enough. Corrupted or misconfigured connection strings, along with outdated OLE DB drivers, can also prevent the pending rows buffer from flushing correctly.

Step-by-Step Resolution Guide

Step 1: Reduce Batch Size in the Application or Query

  • Identify the application, SSIS package, or linked server query performing the bulk operation.
  • Lower the batch size (e.g., from 10,000 rows to 1,000 rows) to stay under the pending rows threshold.
  • In SSIS, adjust the MaximumInsertCommitSize property on the OLE DB Destination component.

Step 2: Update or Reconfigure the OLE DB Provider

  • Ensure you are using the latest Microsoft OLE DB Driver (MSOLEDBSQL19 or later) compatible with SQL Server 2025.
  • Download and install updates via Settings > Apps > Installed Apps on Windows 11, or Server Manager > Add Roles and Features on Windows Server 2025.
  • Reconfigure the provider’s DBPROP_MAXPENDINGROWS value explicitly in the connection properties if your application exposes this setting (common default is 100; raise cautiously based on available memory).

Step 3: Modify the Linked Server Configuration (If Applicable)

  • Open SQL Server Management Studio (SSMS) and navigate to Server Objects > Linked Servers.
  • Right-click the linked server, select Properties, and review the Provider Options.
  • Enable “Allow InProcess” for the provider if it is currently disabled, as out-of-process providers handle pending rows differently.
  • Run the following command to verify provider settings:
  EXEC sp_linkedservers;

Step 4: Commit Transactions More Frequently

  • If using custom T-SQL scripts with cursors or loops, add explicit COMMIT TRANSACTION statements every few hundred rows instead of committing once at the end.
  • Example pattern:
  BEGIN TRANSACTION;
  -- batch of 500 row updates
  COMMIT TRANSACTION;

Alternative or Verification Steps

  • To verify the fix, re-run the original bulk operation and monitor the SQL Server Error Log (Event Viewer > Applications and Services Logs > SQL Server 2025) to confirm Error 10066 no longer appears.
  • If the error persists, as an alternative, switch the data transfer method to BULK INSERT or the bcp utility, which bypasses the pending rows buffer limitation entirely.

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

Troubleshooting Guide: SQL Server Error 10067 – Optimistic Concurrency Violation

Why This Error Happens

This error occurs when a row in a rowset configured for optimistic concurrency control has been modified by another transaction after the current session last fetched or resynchronized it. SQL Server detects a mismatch between the stored timestamp, rowversion, or column values and the current state of the row, indicating a conflicting update occurred. This is commonly triggered by high-concurrency applications, stale client-side caching, long-running transactions holding outdated row images, or missing rowversion/timestamp columns needed for proper concurrency tracking.

Step-by-Step Resolution Guide

Step 1: Verify the Table Schema for Concurrency Tracking Columns

  • Confirm the table includes a rowversion or timestamp data type column used for optimistic concurrency checks.
  • Run the following query to inspect the schema:
SELECT COLUMN_NAME, DATA_TYPE 
FROM INFORMATION_SCHEMA.COLUMNS 
WHERE TABLE_NAME = 'YourTableName';
  • If missing, add one using ALTER TABLE YourTableName ADD RowVersionCol ROWVERSION;

Step 2: Refresh the Rowset Before Updating

  • Ensure the application re-fetches the current row data immediately before attempting an update, rather than relying on a cached version.
  • In ADO/OLE DB or ADO.NET, call Resync() or re-query the dataset using SELECT * FROM YourTableName WHERE PrimaryKey = @id prior to the UPDATE statement.
  • For client cursors, set the CursorType property to adOpenKeyset with LockType set to adLockOptimistic to force proper row validation.

Step 3: Reduce Transaction Isolation Conflicts

  • Open SQL Server Configuration Manager on Windows Server 2025 and confirm the instance is running under SQL Server (MSSQLSERVER) with no blocking network-level locks.
  • In SQL Server Management Studio (SSMS), go to Database Properties > Options and consider enabling Read Committed Snapshot Isolation (RCSI):
ALTER DATABASE YourDatabase SET READ_COMMITTED_SNAPSHOT ON;
  • This reduces blocking and lowers the chance of concurrent writes invalidating your fetched rowset.

Step 4: Check for Triggers or External Processes Modifying Data

  • Review sys.triggers and sys.objects for any AFTER UPDATE or INSTEAD OF triggers that silently modify column values post-fetch.
  • Run:
SELECT name, OBJECT_NAME(parent_id) AS TableName 
FROM sys.triggers 
WHERE is_disabled = 0;
  • Temporarily disable non-critical triggers to confirm they are not the source of the unexpected value change.

Step 5: Implement Retry Logic in the Application Layer

  • Wrap update operations in a try-catch block that detects Error 10067 and automatically re-fetches the row before retrying the write.
  • In C#/.NET, catch the OleDbException or SqlException with error number 10067 and loop a re-fetch-and-retry pattern up to 3 attempts.

Alternative or Verification Steps

  • To verify the fix, simulate concurrent updates from two separate sessions in SSMS and confirm the second session either waits (with RCSI enabled) or receives a handled retry instead of a hard failure.
  • If the issue persists, consider switching the application’s locking strategy from optimistic (adLockOptimistic) to pessimistic (adLockPessimistic) for high-contention tables, though this may reduce overall throughput.

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

Troubleshooting Guide: SQL Server Error 10064 — Data Value Overflow

Why This Error Happens

Error 10064 typically occurs when SQL Server’s OLE DB provider attempts to move data between a source and destination column where the destination data type is too small to hold the source value. This commonly happens during linked server queries, SSIS data flows, or BCP/bulk import operations when metadata between heterogeneous data sources (such as Excel, Access, or flat files) is incorrectly inferred or mismatched. Corrupted provider drivers or outdated OLE DB/ODBC components on Windows Server 2025 / Windows 11 can also cause incorrect type mapping, triggering this overflow error.

Step-by-Step Resolution Guide

Step 1: Identify the Offending Column and Data Type Mismatch

  • Review the full error stack in SQL Server Management Studio (SSMS) to locate the specific column and table referenced.
  • Check the source data for unusually long strings, large numeric values, or null-heavy fields that may be mis-typed.
  • Run the following to inspect destination schema: EXEC sp_columns 'YourTableName';

Step 2: Adjust Column Data Types or Provider Settings

  • Increase the size of the destination column (e.g., change VARCHAR(50) to VARCHAR(255) or NVARCHAR(MAX)) using:
    ALTER TABLE YourTable ALTER COLUMN YourColumn NVARCHAR(255);
  • For linked servers, right-click the linked server in SSMS → Properties → Server Options, and ensure “Collation Compatible” and “Data Access” settings align with the source.
  • If using the Microsoft ACE OLE DB Provider (Excel/Access), set the registry key TypeGuessRows to 0 at:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\16.0\Access Connectivity Engine\Engines\Excel
    This forces the provider to scan all rows instead of guessing from the first 8 rows.

Step 3: Update or Reinstall the OLE DB/ODBC Provider

  • Open Control Panel > Programs > Programs and Features and verify the version of “Microsoft Access Database Engine” or relevant OLE DB provider.
  • Download and reinstall the latest provider matching your SQL Server 2025 architecture (x64) from the Microsoft Download Center.
  • Restart the SQL Server service via services.msc after installation to reload provider bindings.

Step 4: Re-run the Import/Query with Explicit Casting

  • Modify your SSIS package or T-SQL query to explicitly cast or convert columns before insertion:
    SELECT CAST(SourceColumn AS NVARCHAR(255)) FROM SourceTable;
  • In SSIS, open the Data Flow Task, right-click the offending column mapping, and manually adjust metadata in the Advanced Editor.

Alternative or Verification Steps

  • Re-execute the original query, linked server call, or SSIS package and confirm Error 10064 no longer appears in the SQL Server logs (SQL Server Logs > Current in SSMS).
  • As an alternative, export the problematic dataset to a staging table with wide/generic data types (NVARCHAR(MAX)) first, then transform and insert into the final table using controlled T-SQL casting.

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

Troubleshooting Guide: SQL Server Error 10065 – Data Integrity Constraint Violation

Why This Error Happens

Error 10065 occurs when SQL Server 2025 rejects an INSERT, UPDATE, or bulk import operation because the incoming data violates a column-level constraint such as a CHECK constraint, FOREIGN KEY relationship, NOT NULL rule, or a UNIQUE/PRIMARY KEY index. This is frequently triggered by mismatched data types or truncated values during ETL jobs, orphaned records referencing a parent table that no longer exists, or a schema change (like a new CHECK constraint) that wasn’t communicated to the application layer. In some cases on Windows Server 2025, this is compounded by corrupted non-clustered indexes that cause the constraint validator to misread existing row data.

Step-by-Step Resolution Guide

Step 1: Identify the Specific Offending Constraint

  • Open SQL Server Management Studio (SSMS) and check the full error message text, as it usually names the specific constraint (e.g., CK_Age_Positive or FK_Orders_Customers).
  • Run the following query to inspect constraint definitions on the target table:
  SELECT name, definition FROM sys.check_constraints WHERE parent_object_id = OBJECT_ID('YourTableName');
  • Cross-reference the specific row/value causing the failure by isolating the batch insert into smaller chunks.

Step 2: Validate and Clean the Source Data

  • If the error stems from an ETL job or bulk import, open the source file (CSV/JSON) and check for NULL values in columns marked NOT NULL.
  • Check for orphaned Foreign Keys by running:
  SELECT T1.ForeignKeyColumn FROM ChildTable T1 
  LEFT JOIN ParentTable T2 ON T1.ForeignKeyColumn = T2.PrimaryKeyColumn 
  WHERE T2.PrimaryKeyColumn IS NULL;
  • Correct the data type mismatches in the staging table to match the exact precision/scale of the destination table.

Step 3: Check for Index or Schema Corruption

  • Open Command Prompt as Administrator on your Windows Server 2025 instance.
  • Run a consistency check to rule out physical corruption causing the engine to misread constraints:
  DBCC CHECKCONSTRAINTS ('YourTableName') WITH ALL_CONSTRAINTS;
  • If corruption is suspected, execute DBCC CHECKDB('YourDatabaseName') WITH NO_INFOMSGS, ALL_ERRORMSGS; to generate a full integrity report.

Step 4: Temporarily Disable and Re-validate Constraints (If Safe)

  • Navigate to the specific table constraint in SSMS Object Explorer under Tables > Keys.
  • If you need to force a bulk load of legacy data that you intend to clean up immediately after, disable the check temporarily:
  ALTER TABLE YourTableName NOCHECK CONSTRAINT ALL;
  • Important: Immediately after the load, re-enable and validate the constraint to ensure integrity is restored:
  ALTER TABLE YourTableName WITH CHECK CHECK CONSTRAINT ALL;

Alternative or Verification Steps

  • Verification: Re-run the original INSERT/UPDATE transaction that failed. If it processes without throwing Error 10065, and DBCC CHECKCONSTRAINTS returns zero rows, the data integrity issue is resolved.
  • Alternative: If the issue persists across multiple tables, restore the database schema from a known-good backup using Windows Server 2025’s File History or SQL Server’s native RESTORE DATABASE command to rule out a corrupted system catalog.

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

Why This Error Happens

Error 10062 occurs within the SQL Server Query Notification (SqlDependency/Service Broker) subsystem when the underlying event notification is invalidated before the provider can complete processing. This is typically triggered by a schema change, permission revocation on the queue/service, or a Service Broker configuration issue that forces the notification to be rolled back. In Windows Server 2025 / Windows 11 environments, this is also frequently linked to corrupted or misconfigured Service Broker GUIDs after a database restore or migration.

Step-by-Step Resolution Guide

Step 1: Verify Service Broker is Enabled

  • Open SQL Server Management Studio (SSMS) and run the following query to check the status:
  SELECT name, is_broker_enabled FROM sys.databases WHERE name = 'YourDatabaseName';
  • If is_broker_enabled returns 0, enable it immediately using:
  ALTER DATABASE YourDatabaseName SET ENABLE_BROKER;
  • Note: If the database is in a restricted state, use ALTER DATABASE YourDatabaseName SET ENABLE_BROKER WITH ROLLBACK IMMEDIATE;

Step 2: Check and Repair Service Broker GUID Mismatches

  • A mismatch often occurs after a database is copied or restored (common in Windows Server 2025 failover clusters).
  • Run this command to generate a new Service Broker ID if a conflict is detected:
  ALTER DATABASE YourDatabaseName SET NEW_BROKER;
  • Restart the SQL Server Service via services.msc or PowerShell:
  Restart-Service -Name "MSSQLSERVER" -Force

Step 3: Validate Permissions on Notification Queues

  • Ensure the application’s service account has SUBSCRIBE QUERY NOTIFICATIONS permission at the server level.
  • Grant the permission manually if it is missing:
  GRANT SUBSCRIBE QUERY NOTIFICATIONS TO [DOMAIN\ServiceAccount];
  • Check Windows Firewall settings on Windows Server 2025 to ensure the SQL Server port (default 1433) and the Service Broker endpoint port (default 4022) are not blocking the specific notification traffic.

Step 4: Clear Stale Dialogs and Conversation Endpoints

  • Stale conversations can cause the provider to cancel the notification handshake.
  • Identify and end broken conversations using:
  SELECT * FROM sys.conversation_endpoints WHERE state_desc = 'ERROR';
  • End the specific session ID found above:
  END CONVERSATION 'conversation_handle_from_query' WITH CLEANUP;

Alternative or Verification Steps

  • Verify the Fix: Re-run your application’s query notification subscription and monitor the SQL Server Error Log (via SSMS or EventVwr.msc) to confirm Error 10062 no longer appears during the notification handshake.
  • Alternative Solution: If the error persists after resetting the Broker ID, perform a full restart of the SQL Server instance (not just the service) to clear any cached metadata regarding the Query Notification subscriptions still held in memory.

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

Troubleshooting Guide: SQL Server Error 10063 – Data Conversion Failure

Why This Error Happens

Error 10063 occurs when SQL Server’s data type conversion engine encounters a value that cannot be cast into the target data type due to formatting, encoding, or structural incompatibility rather than simple overflow or sign issues. This is commonly triggered by implicit conversions between incompatible types (such as XML, CLR user-defined types, or SQL_VARIANT) where the underlying byte structure doesn’t match the expected schema. Corrupted intermediate buffers during Extended Events tracing or Linked Server queries in SQL Server 2025 can also trigger this specific error code.

Step-by-Step Resolution Guide

Step 1: Identify the Offending Query and Data Type

  • Open SQL Server Management Studio (SSMS) 21 and check the specific query from the Activity Monitor or Error Log that triggered Error 10063.
  • Run SELECT name, system_type_id, max_length FROM sys.columns WHERE object_id = OBJECT_ID('YourTableName'); to verify schema definitions.
  • Look specifically for mismatches involving sql_variant, XML, or CLR types, as these are the primary triggers for this specific error code in 2025.

Step 2: Update the Database Compatibility Level

  • Legacy compatibility levels (130 or lower) sometimes mishandle new conversion logic introduced in SQL Server 2025.
  • Navigate to Object Explorer > Right-click Database > Properties > Options.
  • Set the Compatibility Level to SQL Server 2025 (170) to ensure the Cardinality Estimator and conversion engine align with the current build.
  • Run the command: ALTER DATABASE YourDB SET COMPATIBILITY_LEVEL = 170;

Step 3: Rebuild Corrupted Non-Clustered Indexes

  • Data value conversion errors often stem from corrupted index pages holding “ghost” data types from a previous migration.
  • Open a New Query window and execute DBCC CHECKDB ('YourDatabaseName') WITH DATA_PURITY; to scan for column value corruption.
  • If errors are reported, run ALTER INDEX ALL ON YourTableName REBUILD; to force a clean rewrite of the index pages.

Step 4: Patch the OLE DB Driver

  • If the error originates from a Linked Server, the issue is likely a mismatch between the 64-bit SQL engine and an outdated 32-bit provider.
  • Go to C:\Program Files\Microsoft SQL Server\160\DTS\ConnectionManagers (path may vary based on install drive) and verify the MSOLEDBSQL driver version.
  • Uninstall any driver version lower than 19.5 and download the latest MSOLEDBSQL redistributable from the Microsoft Download Center.

Alternative or Verification Steps

  • Verification: Re-run the original SELECT or INSERT statement that failed; if it executes without throwing Error 10063, the schema/index fix was successful.
  • Alternative: If the error persists specifically within SSIS packages, bypass the issue by explicitly casting the problematic column using CAST(column AS NVARCHAR(50)) within the Data Flow Task rather than relying on the default implicit conversion.

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

Why This Error Happens

Error 10058 occurs when an OLE DB consumer (such as a linked server query, a custom data access application, or a legacy ADO/OLEDB client) attempts to call IRowsetChange::InsertRow while one or more previously fetched row handles are still active and have not been released via IRowset::ReleaseRows. SQL Server 2025’s OLE DB provider enforces strict row-handle lifecycle management, so any pending handle blocks new insert operations on that rowset. This is most commonly caused by application code that does not properly close cursors, by Multiple Active Result Sets (MARS) being disabled when it’s required, or by a provider/driver version mismatch between the client and Windows Server 2025/Windows 11 host.

Step-by-Step Resolution Guide

Step 1: Identify the Offending Session and Query

  • Run SELECT * FROM sys.dm_exec_sessions WHERE status = 'running' to find long-running or stalled connections holding row handles.
  • Check sys.dm_exec_cursors(0) to see if any server-side cursors are open and not deallocated.
  • Review application logs for IRowset or IRowsetChange calls that skip ReleaseRows.

Step 2: Enable or Verify MARS Settings

  • Open the connection string used by the client application and confirm MultipleActiveResultSets=True is set if the app performs concurrent reads and writes.
  • For ODBC/OLEDB DSNs on Windows 11, go to Control Panel > Administrative Tools > ODBC Data Sources, select the SQL Server 2025 driver entry, and enable MARS Connection under the advanced options tab.
  • Restart the application pool or service consuming the connection after the change.

Step 3: Update the OLE DB Provider / Native Client

  • Confirm the client machine is using the matching Microsoft OLE DB Driver for SQL Server 2025 (not a legacy SQLNCLI or SQLOLEDB provider).
  • Download and install the latest driver from the Microsoft Download Center, then reboot the Windows Server 2025 host.
  • Verify the provider version with: SELECT SERVERPROPERTY('ProductVersion') on the server and check the driver’s file version in C:\Windows\System32\msoledbsql19.dll (or the installed path).

Step 4: Explicitly Release Row Handles in Code

  • In the application or stored procedure making the OLE DB calls, ensure every GetNextRows call is paired with a corresponding ReleaseRows before calling InsertRow.
  • If using a linked server distributed query, add SET NOCOUNT ON; and ensure the remote query closes its cursor with DEALLOCATE before issuing inserts.
  • Rebuild and redeploy the client application after the code fix.

Step 5: Restart SQL Server Service and Clear Cached Plans

  • Open SQL Server Configuration Manager, restart the SQL Server (MSSQLSERVER) service to clear any stuck rowset handles in memory.
  • Run DBCC FREEPROCCACHE to remove cached execution plans that may reference stale cursor states.

Alternative or Verification Steps

  • Re-run the original insert operation from the client application and confirm Error 10058 no longer appears in SQL Server Error Logs (EXEC xp_readerrorlog).
  • If the error persists, switch the application’s cursor type from a server-side keyset/dynamic cursor to a client-side static cursor, which avoids holding row handles open during insert operations.

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

Troubleshooting Guide: Error 10056 – DBPROP_MAXPENDINGROWS Limit Exceeded

Why This Error Happens

This error occurs when the OLE DB provider used for a batch update or rowset operation accumulates more pending row changes than allowed by the DBPROP_MAXPENDINGROWS property before committing them to the database. It typically arises during large bulk update, insert, or delete operations performed through ADO/OLE DB consumers (such as linked server queries or ETL batch jobs) where the batch size configured on the client side exceeds the provider’s internal pending-row threshold. This is a client-side property mismatch rather than a server configuration failure, but it is commonly triggered by large transactions run against SQL Server 2025 from applications still using legacy OLE DB batching logic.

Step-by-Step Resolution Guide

Step 1: Identify the Source of the Batch Operation

  • Determine whether the error originates from a linked server query, an SSIS package, a custom application using ADO/OLE DB, or a third-party ETL tool.
  • Check the application or job logs on Windows Server 2025 for the exact statement or component triggering Error 10056.
  • Confirm the OLE DB provider in use (e.g., MSOLEDBSQL or SQLNCLI11) via Control Panel > Programs and Features or the provider’s connection string.

Step 2: Adjust the DBPROP_MAXPENDINGROWS Property

  • Locate the application or script setting the DBPROP_MAXPENDINGROWS property (often set via IRowsetUpdate in custom OLE DB consumer code).
  • Increase the value explicitly, or set it to 0 to allow unlimited pending rows if the provider supports it.
  • If using SSIS, open the OLE DB Destination editor, go to Advanced Editor > Component Properties, and verify the Rows per Batch and Maximum Insert Commit Size values are set to a reasonable number (e.g., 5000–10000) instead of leaving them at default (0 = unlimited in some cases, but misconfigured in others).

Step 3: Reduce Batch Size at the Application Level

  • Break large bulk operations into smaller logical batches using BEGIN TRAN / COMMIT blocks every 1,000–5,000 rows.
  • In custom .NET or ADO applications, call Update or UpdateBatch more frequently rather than accumulating all changes before committing.
  • For linked server queries, rewrite the operation using OPENQUERY with smaller row-based filtering instead of a single massive update statement.

Step 4: Update the OLE DB Provider

  • Ensure you are using the latest Microsoft OLE DB Driver for SQL Server (MSOLEDBSQL) compatible with SQL Server 2025, downloadable from the official Microsoft Download Center.
  • Uninstall older SQLNCLI or SQLOLEDB providers if still in use, as these are deprecated and have known batching limitations.
  • Restart the application pool or service (e.g., IIS, SQL Agent) after installing the updated provider.

Step 5: Verify SQL Server Configuration

  • Open SQL Server Management Studio (SSMS), connect to the instance, and check Server Properties > Connections for any unusually low default batch/transaction size settings.
  • Confirm the SQL Server Agent job (if applicable) is not inheriting a legacy connection string with hardcoded pending-row limits.

Alternative or Verification Steps

  • Re-run the original batch operation with the adjusted batch size or updated provider, and confirm that Error 10056 no longer appears in the SQL Server error log (Log\ERRORLOG) or Windows Event Viewer under Applications and Services Logs.
  • As an alternative, bypass OLE DB batching entirely by switching the operation to use bcp.exe or the BULK INSERT T-SQL command, which does not rely on the DBPROP_MAXPENDINGROWS property.

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

Why This Error Happens

Error 10057 occurs when a rowset—typically tied to an OLE DB provider, cursor, or in-memory table operation—reaches the maximum number of active rows it is architecturally permitted to hold. This is commonly triggered by exceeding the hard limit on rows within a single cursor-based result set, an undersized or misconfigured memory-optimized table in SQL Server 2025, or fragmented/corrupted index structures that force the rowset manager to miscalculate active row counts. It can also surface when third-party or legacy OLE DB drivers interacting with SQL Server impose their own row ceiling well below SQL Server’s actual capacity.

Step-by-Step Resolution Guide

Step 1: Identify the Query or Process Triggering the Limit

  • Check SQL Server Error Logs located at C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Log\ERRORLOG for the exact query context.
  • Run sp_who2 or query sys.dm_exec_requests to identify the active session generating Error 10057.
  • Note whether the operation uses a server-side cursor, bulk insert, or memory-optimized table.

Step 2: Switch from Cursor-Based Operations to Set-Based Logic

  • Replace FAST_FORWARD or KEYSET cursors with standard SELECT/INSERT set-based statements where possible.
  • If using SSIS or a legacy OLE DB provider, update the connection manager to use the native MSOLEDBSQL 19+ driver instead of outdated drivers.
  • Adjust application code to avoid opening cursors against tables with extremely high row counts (typically above 2^31 rows in older rowset implementations).

Step 3: Rebuild Indexes and Validate Table Integrity

  • Open SQL Server Management Studio (SSMS) and run:
  DBCC CHECKTABLE ('YourTableName') WITH ALL_ERRORMSGS;
  • If corruption is found, rebuild the clustered index:
  ALTER INDEX ALL ON YourTableName REBUILD;
  • Confirm statistics are current with UPDATE STATISTICS YourTableName WITH FULLSCAN;.

Step 4: Review Memory-Optimized Table Configuration (If Applicable)

  • Navigate to SSMS > Databases > YourDatabase > Tables and check if the affected table uses MEMORY_OPTIMIZED = ON.
  • Verify the database has sufficient space allocated in the FILESTREAM/memory-optimized filegroup via Database Properties > Filegroups.
  • Increase allocated container size in C:\SQLData\MemoryOptimizedFG if space constraints are causing row ceiling miscalculations.

Step 5: Apply the Latest SQL Server 2025 Cumulative Update

  • Go to Microsoft Update Catalog and download the latest Cumulative Update (CU) for SQL Server 2025.
  • Install via elevated PowerShell:
  Setup.exe /Action=Patch /IAcceptSQLServerLicenseTerms /Quiet
  • Restart the SQL Server service through Services.msc (SQL Server (MSSQLSERVER)) after installation.

Alternative or Verification Steps

  • Re-run the original query or application process that triggered Error 10057 and confirm the row insertion completes without exception.
  • If the error persists, isolate the table into a new test database using BCP export/import to rule out underlying corruption versus a genuine row-count architectural limit.

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

Troubleshooting Guide: SQL Server Error 10054 – Data Value Overflow

Why This Error Happens

Error 10054 occurs when SQL Server’s OLE DB provider attempts to move data between a source and destination column, but the destination column’s data type is too small to hold the source value. This commonly happens during linked server queries, SSIS data imports, or BCP operations where schema definitions between source and target do not match (e.g., mapping a BIGINT to an INT, or a large VARCHAR to a truncated CHAR field). It can also surface due to implicit data type conversions failing silently at the provider level before reaching SQL Server’s native validation.

Step-by-Step Resolution Guide

Step 1: Identify the Offending Column and Data Type Mismatch

  • Run the failing query or package in isolation to capture the exact table and column referenced in the stack trace.
  • Check source and destination schemas using sp_help 'TableName' in SQL Server Management Studio (SSMS) 21.
  • Look specifically for mismatches like NVARCHAR(MAX) sources mapping to NVARCHAR(50) destinations, or DECIMAL precision differences.

Step 2: Correct the Column Metadata or Casting Logic

  • Alter the destination table to widen the column: ALTER TABLE dbo.YourTable ALTER COLUMN YourColumn VARCHAR(255);
  • If using a Linked Server, update the OLE DB provider settings via sp_serveroption to disable “Use Remote Collation” if collation mismatches are compounding the overflow.
  • In SSIS, open the Data Flow Task, right-click the offending component, and manually edit the “External Columns” metadata in the Advanced Editor to match the source length exactly.

Step 3: Adjust Provider-Specific Registry or Connection String Settings

  • For MSDASQL or SQLNCLI issues on Windows Server 2025, verify the OraOLEDB or SQLNCLI11 provider is updated to the latest build via Windows Update or the Feature Pack for SQL Server 2025.
  • Check C:\Program Files\Microsoft SQL Server\160\DTS\Binn\ to ensure no legacy DLLs are conflicting with the newer provider version.
  • Restart the SQL Server service (net stop MSSQLSERVER && net start MSSQLSERVER) after any provider update to clear cached metadata.

Step 4: Validate Collation and Locale Settings

  • Run SELECT SERVERPROPERTY('Collation'); to confirm the server collation isn’t introducing hidden byte-width overflow issues on Unicode columns.
  • Ensure Windows 11/Server 2025 regional settings (Control Panel > Region) match the expected locale of the data source to prevent silent numeric formatting overflow (e.g., decimal separators).

Alternative or Verification Steps

  • Re-run the original import/query with a TRY_CAST or TRY_CONVERT wrapper on the suspect column; if it returns NULL instead of erroring, you’ve confirmed the overflow source.
  • If the error persists after widening columns, bypass the OLE DB provider entirely by switching the connection to the native ODBC Driver 18 for SQL Server, which handles large object (LOB) overflow more gracefully than legacy OLE DB stacks.

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

Troubleshooting Guide: SQL Server Error 10055 — “The data violated the integrity constraints for one or more columns”

Why This Error Happens

This error occurs when SQL Server 2025 attempts to insert or update a row that violates a defined constraint, such as a PRIMARY KEY, FOREIGN KEY, CHECK, or UNIQUE constraint on the target table. It can also be triggered by corrupted index metadata or schema mismatches introduced during a migration, replication job, or bulk insert operation. In some cases, this surfaces on Windows Server 2025 / Windows 11 environments after an in-place upgrade where legacy constraint definitions were not properly re-validated against the new database engine build.

Step-by-Step Resolution Guide

Step 1: Identify the Offending Table and Constraint

  • Open SQL Server Management Studio (SSMS) and run the failing query manually to capture the full error stack.
  • Execute DBCC CHECKCONSTRAINTS('YourTableName') WITH ALL_CONSTRAINTS; to list every constraint currently being violated.
  • Note the specific column(s) and constraint name(s) returned in the result set — this narrows the root cause immediately.

Step 2: Validate and Repair the Data

  • Query the source data for NULLs, duplicates, or out-of-range values using a filter matching the violated constraint logic (e.g., SELECT * FROM YourTableName WHERE ColumnName IS NULL;).
  • Clean or correct the offending rows directly, or stage them in a temporary table for manual review before re-inserting.
  • If the issue stems from a bulk import, re-check the source file/ETL mapping in C:\Program Files\Microsoft SQL Server\160\DTS\Binn\ for mismatched data types.

Step 3: Rebuild or Recheck Constraints

  • If constraint metadata appears corrupted, disable and re-enable the constraint using ALTER TABLE YourTableName NOCHECK CONSTRAINT ConstraintName; followed by ALTER TABLE YourTableName WITH CHECK CHECK CONSTRAINT ConstraintName;.
  • Run DBCC CHECKDB('YourDatabaseName') WITH NO_INFOMSGS, ALL_ERRORMSGS; to rule out underlying page-level corruption on Windows Server 2025 storage volumes.
  • Restart the SQL Server service via services.msc or net stop MSSQLSERVER && net start MSSQLSERVER if constraint caching appears stale after the repair.

Step 4: Review Application-Level Insert Logic

  • Check the application or ETL job (e.g., SSIS package, .NET Entity Framework context) for outdated schema assumptions that no longer match the live table definition.
  • Update any hardcoded INSERT/UPDATE statements to align with current column constraints, especially after a recent schema change deployment.

Alternative or Verification Steps

  • Re-run the original transaction or batch job that triggered Error 10055 and confirm it completes without exception; also re-run DBCC CHECKCONSTRAINTS to confirm zero violations remain.
  • If the error persists, restore the affected table from the last known-good backup using SSMS’s “Restore Database” wizard, then re-apply only validated data changes.

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

Why This Error Happens

Error 10052 occurs when an OLE DB provider rejects a row insertion during the notification phase of a rowset operation, typically triggered during replication, linked server transactions, or bulk insert operations. This is commonly caused by a mismatched or outdated OLE DB driver, insufficient permissions on the destination provider, or a corrupted distribution/subscription database in replication scenarios. In Windows Server 2025 and Windows 11 environments, this can also stem from stricter provider security policies enforced by updated OLE DB components bundled with SQL Server 2025.

Step-by-Step Resolution Guide

Step 1: Verify OLE DB Provider Compatibility

  • Confirm the provider (e.g., SQLNCLI, MSOLEDBSQL, or a third-party provider) is updated to a version certified for SQL Server 2025.
  • Check installed version via SELECT * FROM sys.dm_os_loaded_modules WHERE name LIKE '%oledb%'.
  • Download and install the latest Microsoft OLE DB Driver from the official Microsoft Download Center if outdated.

Step 2: Check Linked Server and Provider Permissions

  • Navigate to SQL Server Management Studio (SSMS) > Server Objects > Linked Servers > Providers.
  • Right-click the relevant provider (e.g., SQLNCLI11) > Properties.
  • Ensure “Allow InProcess” is checked if the provider requires in-process execution for notifications.
  • Verify the SQL Server service account has read/write permissions on the destination path or database referenced by the provider.

Step 3: Repair or Rebuild Replication/Distribution Components

  • If the error occurs during replication, open SSMS and navigate to Replication > Local Subscriptions.
  • Right-click the affected subscription and select “View Synchronization Status” to confirm the exact failure point.
  • Run exec sp_dropdistributor @no_checks = 1 followed by exec sp_adddistributor to rebuild a corrupted distribution database if errors persist.
  • Restart the SQL Server Agent service via services.msc or net stop SQLSERVERAGENT && net start SQLSERVERAGENT.

Step 4: Review SQL Server Error Logs and Event Viewer

  • Open Event Viewer on Windows Server 2025 and navigate to Windows Logs > Application.
  • Filter for Source: MSSQLSERVER and Event ID: 10052 to capture the exact transaction context.
  • Cross-reference with SQL Server error logs located at C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Log\ERRORLOG.

Alternative or Verification Steps

  • Re-run the failed insert/replication job manually and confirm no 10052 error appears in the SQL Server Agent job history.
  • If the issue persists, bypass the problematic OLE DB provider temporarily by switching to a native SQL Server connection (ODBC) for the insert operation to isolate whether the provider itself is the root cause.

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

Troubleshooting Guide: SQL Server Error 10053 — Data Conversion Failure

Why This Error Happens

This error occurs when SQL Server 2025 attempts to implicitly or explicitly convert a data value between incompatible types, but the failure is not due to a simple overflow or sign mismatch — instead, it stems from deeper issues such as corrupted metadata in the source column, mismatched collation settings during conversion, or malformed data (e.g., invalid characters in a string being cast to a numeric or date type). It can also surface when linked server queries or BCP/bulk insert operations pass data that violates the target schema’s type constraints. In some cases, outdated OLE DB or ODBC drivers on Windows Server 2025/Windows 11 mishandle the data buffer, triggering this generic conversion fault.

Step-by-Step Resolution Guide

Step 1: Identify the Exact Query and Column Causing the Conversion Failure

  • Enable SQL Server Profiler or Extended Events to capture the exact statement throwing Error 10053.
  • Check the SQL Server error log at C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Log\ERRORLOG for the specific object and column referenced.
  • Run SELECT DATA_TYPE, COLLATION_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'YourTable' to confirm expected types.

Step 2: Validate and Clean the Source Data

  • Run a diagnostic query such as SELECT * FROM YourTable WHERE TRY_CONVERT(TargetType, ColumnName) IS NULL AND ColumnName IS NOT NULL to isolate bad rows.
  • Look for hidden characters, trailing spaces, or non-ASCII symbols using SELECT ColumnName, ASCII(ColumnName) FROM YourTable.
  • Correct or remove invalid rows before re-running the original query or ETL job.

Step 3: Update Drivers and Check Collation Settings

  • Navigate to Control Panel > Administrative Tools > ODBC Data Sources (64-bit) on Windows Server 2025/Windows 11 and confirm the SQL Server Native Client or ODBC Driver 18+ is installed and updated.
  • Verify server and database collation alignment using SELECT SERVERPROPERTY('Collation') and SELECT DATABASEPROPERTYEX('YourDB', 'Collation').
  • If mismatched, apply COLLATE DATABASE_DEFAULT explicitly in the query to force consistent comparison during conversion.

Step 4: Rebuild Corrupted Indexes or Statistics on the Affected Table

  • Run DBCC CHECKTABLE ('YourTable') WITH ALL_ERRORMSGS to detect underlying corruption.
  • Execute ALTER INDEX ALL ON YourTable REBUILD to refresh index structures that may be holding stale type metadata.
  • Update statistics with UPDATE STATISTICS YourTable WITH FULLSCAN.

Step 5: Test the Conversion Logic in Isolation

  • Recreate the failing conversion in a minimal script using TRY_CAST or TRY_CONVERT instead of CAST/CONVERT to gracefully handle bad values.
  • Deploy the corrected query to a test environment running the same Windows Server 2025 configuration before pushing to production.

Alternative or Verification Steps

  • Re-run the original failing query or application process and confirm Error 10053 no longer appears in the SQL Server error log or Event Viewer (Windows Logs > Application).
  • If the issue persists, temporarily isolate the operation using TRY_CONVERT wrapped in a CASE statement to bypass the faulty rows and confirm whether the root cause is isolated to specific records versus a systemic driver/collation issue.

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

Troubleshooting Guide: SQL Server Error 10035 — “No value was given for one or more of the required parameters”

Why This Error Happens

This error typically occurs when a stored procedure, SSIS package, or application call to SQL Server 2025 omits a required parameter value, often due to a mismatch between the expected parameter schema and the actual call signature. It can also surface when corrupted metadata in a linked server configuration or an outdated OLE DB/ODBC provider fails to map parameters correctly between Windows Server 2025/Windows 11 client drivers and the SQL engine. Additionally, permission restrictions on the executing account can prevent SQL Server from resolving default parameter values, triggering this error instead of a more descriptive access-denied message.

Step-by-Step Resolution Guide

Step 1: Verify Stored Procedure and Query Parameters

  • Open SQL Server Management Studio (SSMS) and locate the exact stored procedure or query triggering the error.
  • Run sp_helptext 'YourProcedureName' to review required parameters.
  • Confirm that every @Parameter in the definition has a corresponding value supplied in the calling application or script.
  • Check for NULL values being passed where a default is not defined.

Step 2: Update or Reconfigure the Data Provider/Driver

  • Navigate to Control Panel > Administrative Tools > ODBC Data Sources (64-bit) on Windows Server 2025 or Windows 11.
  • Ensure the SQL Server Native Client or Microsoft OLE DB Driver 19+ is installed and selected (not a legacy driver).
  • If using a linked server, run:
  EXEC sp_testlinkedserver 'YourLinkedServerName';
  • Reconfigure the linked server provider options via Server Objects > Linked Servers > Properties to ensure “Dynamic parameter” support is enabled.

Step 3: Check Application Connection String and Command Object

  • Inspect the application code (ADO.NET, ODBC, or OLE DB) for missing Parameters.Add() or Command.Parameters.AddWithValue() calls.
  • Ensure parameter order matches the stored procedure definition exactly, especially if using positional (not named) parameters.
  • Validate the connection string does not strip parameter metadata (e.g., missing Provider=SQLNCLI11 or incorrect Initial Catalog values).

Step 4: Review Permissions and Execution Context

  • Confirm the executing Windows account or SQL login has EXECUTE permission on the procedure:
  GRANT EXECUTE ON YourProcedureName TO [YourUser];
  • Check Event Viewer under Windows Logs > Application for correlating Event ID 10035 entries with additional context.

Step 5: Repair or Reinstall Affected Components

  • If the error persists, repair the SQL Server 2025 client tools via Settings > Apps > Installed Apps > Microsoft SQL Server > Modify.
  • Reboot Windows Server 2025/Windows 11 and re-test the failing query or integration job.

Alternative or Verification Steps

  • Re-run the original query or application call with SQL Server Profiler or Extended Events active to confirm no parameter-binding errors remain in the trace output.
  • As an alternative fix, manually recreate the stored procedure or linked server definition from a known-good backup script to rule out metadata corruption.

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

Troubleshooting Guide: Error 10042 – Cannot Set Properties While There Is an Open Rowset

Why This Error Happens

Error 10042 occurs when an OLE DB provider or ADO/ADO.NET application attempts to modify connection or command properties (such as IRowsetInfo, IDBProperties, or command text) while an active rowset from a previous query is still open. SQL Server 2025 enforces stricter property-locking on open rowsets to prevent inconsistent state changes mid-transaction. This typically happens due to improperly closed cursors, unclosed DataReader/Recordset objects, or application code that reuses a connection object without releasing the prior result set.

Step-by-Step Resolution Guide

Step 1: Identify the Unclosed Rowset in Application Code

  • Review the client application (C#, VB.NET, or legacy ADO) for any SqlDataReader, ADODB.Recordset, or OLE DB rowset objects that are not explicitly closed.
  • Check for missing calls to .Close() or .Dispose() after data retrieval.
  • Look specifically for code paths where exceptions may skip cleanup logic (missing try/finally or using blocks).

Step 2: Enforce Proper Connection and Command Lifecycle

  • Wrap all data access objects in using statements (C#) to guarantee disposal:
  using (SqlDataReader reader = command.ExecuteReader())
  {
      // process data
  }
  • For legacy ADO, explicitly call recordset.Close() and set recordset = Nothing before modifying Command or Connection properties.
  • Avoid setting CommandText, CommandTimeout, or connection-level properties while a reader or recordset tied to that command is still active.

Step 3: Adjust MARS (Multiple Active Result Sets) Settings

  • Open the connection string configuration file (e.g., web.config, app.config, or appsettings.json).
  • Add or verify the following parameter: MultipleActiveResultSets=True;
  • This allows multiple commands to execute on the same connection without forcing a full close of prior rowsets, which often resolves Error 10042 in multi-query scenarios.

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

  • Navigate to Control Panel > Programs and Features on Windows Server 2025 / Windows 11.
  • Confirm you are using the latest Microsoft OLE DB Driver for SQL Server (MSOLEDBSQL19 or newer) rather than the deprecated SQLNCLI or SQLOLEDB providers.
  • Download the latest driver from the official Microsoft Download Center and reinstall if an outdated version is detected.

Step 5: Restart SQL Server Services and Clear Cached Connections

  • Open Services.msc on Windows Server 2025.
  • Restart the SQL Server (MSSQLSERVER) service and the SQL Server Agent service.
  • Clear any connection pooling cache in the application by restarting the application pool (IIS) or the client application process.

Alternative or Verification Steps

  • Run a test query via SQL Server Management Studio (SSMS) using the same connection string properties the application uses, confirming no property-setting errors occur after executing and closing a rowset.
  • If the error persists, enable SqlConnection logging or SQL Profiler tracing to pinpoint the exact command sequence triggering Error 10042, then isolate and refactor that specific code block.

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

Troubleshooting Guide: Error 10034 – “The specified table or view does not exist or contains errors” in SQL Server 2025

Why This Error Happens

This error typically occurs when a client application or linked server query references a table, view, or synonym object that has been renamed, dropped, or was never properly created in the target database schema. It can also surface due to stale metadata caching on the client side (such as outdated OLE DB or ODBC driver schema caches) or when the connecting user lacks sufficient permissions to resolve the object name, causing SQL Server to report it as non-existent rather than returning an access-denied message. Additionally, cross-database or cross-server queries may fail with this error if the referenced object exists in a different schema than the default one assumed by the query.

Step-by-Step Resolution Guide

Step 1: Verify the Object Exists and Check Schema Ownership

  • Open SQL Server Management Studio (SSMS) and connect to the instance reporting the error.
  • Run SELECT * FROM sys.objects WHERE name = 'YourTableName'; to confirm the object exists in the current database.
  • Check if the object is under a non-default schema by running SELECT s.name AS SchemaName, o.name AS ObjectName FROM sys.objects o JOIN sys.schemas s ON o.schema_id = s.schema_id WHERE o.name = 'YourTableName';
  • If the schema is not “dbo”, update your query to explicitly reference it (e.g., SELECT * FROM SalesSchema.Orders).

Step 2: Refresh Client-Side Metadata Cache

  • On Windows Server 2025 or Windows 11, navigate to C:\Program Files\Microsoft SQL Server\160\Tools\Binn\ and restart any client tools like SSMS or Azure Data Studio.
  • If using a linked server, run EXEC sp_refreshsqlmodule 'YourViewName'; to force SQL Server to recompile the view definition.
  • For ODBC/OLE DB connections, clear the driver cache by removing and re-adding the DSN entry in the ODBC Data Source Administrator (found via odbcad32.exe).

Step 3: Validate User Permissions on the Object

  • Run SELECT * FROM fn_my_permissions('dbo.YourTableName', 'OBJECT'); to confirm the connecting login has SELECT or appropriate rights.
  • If permissions are missing, grant access using GRANT SELECT ON dbo.YourTableName TO [YourUserOrRole];
  • Ensure the login is mapped correctly to the database user via sys.database_principals and not orphaned after a migration or restore.

Step 4: Check for Cross-Database or Linked Server Reference Issues

  • If the query spans multiple databases, confirm the three-part naming convention is used: SELECT * FROM DatabaseName.SchemaName.TableName.
  • For linked servers, run EXEC sp_linkedservers; to verify the server is still registered and reachable.
  • Test connectivity with EXEC sp_testlinkedserver 'YourLinkedServerName'; and re-create the linked server definition if it fails.

Step 5: Rebuild or Repair the View Definition (If Applicable)

  • If the error points to a view rather than a table, run sp_helptext 'YourViewName'; to inspect its underlying definition for broken references.
  • Drop and recreate the view using DROP VIEW YourViewName; GO CREATE VIEW YourViewName AS ... with corrected table references.
  • Restart the SQL Server service via Services.msc (services.msc) on Windows Server 2025 if schema changes do not immediately propagate.

Alternative or Verification Steps

  • Re-run the original failing query or application request after completing the steps above; a successful data return confirms the fix.
  • If the error persists, use SQL Server Profiler or Extended Events to trace the exact query being sent by the application, as the issue may stem from a mismatched connection string pointing to the wrong database instance.

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

Troubleshooting Guide: Error 10032 — “Cannot Return Multiple Result Sets” in SQL Server 2025

Why This Error Happens

This error occurs when a client application executes a batch or stored procedure that returns multiple result sets, but the underlying OLE DB or ODBC provider being used is configured or coded to handle only a single result set (MARS – Multiple Active Result Sets disabled). It is commonly triggered by legacy connection strings, outdated provider drivers (such as SQLOLEDB), or application code using the ExecuteReader method without properly iterating through result sets using NextResult(). Additionally, on Windows Server 2025, this can occur if the Microsoft OLE DB Driver for SQL Server is misconfigured or if MARS is explicitly disabled in the connection string.

Step-by-Step Resolution Guide

Step 1: Enable Multiple Active Result Sets (MARS) in the Connection String

  • Locate the application’s connection string configuration file (e.g., web.config, app.config, or a custom .ini/.json settings file).
  • Add or modify the parameter to include: MultipleActiveResultSets=True;
  • Example full string: Server=myServer;Database=myDB;Integrated Security=True;MultipleActiveResultSets=True;
  • Restart the application pool or service for the change to take effect.

Step 2: Update the Database Provider/Driver

  • Verify the current provider: Check if the application is using the deprecated SQLOLEDB provider, which does not support MARS.
  • Navigate to Control Panel > Programs > Programs and Features on Windows Server 2025 to check installed driver versions.
  • Download and install the latest Microsoft OLE DB Driver 19 for SQL Server (MSOLEDBSQL19) from the official Microsoft Download Center.
  • Update the provider name in the connection string to Provider=MSOLEDBSQL19;.

Step 3: Fix Application Code Logic (ADO.NET/C#)

  • Open the source code file handling the SQL execution (relevant for in-house applications).
  • Ensure the code uses a while (reader.NextResult()) loop to process all result sets rather than just reading the first set and closing the connection.
  • Example fix in C#:
  do {
      while (reader.Read()) { /* Process row */ }
  } while (reader.NextResult());
  • Save the file and recompile the application.

Step 4: Verify SQL Server Configuration Manager Settings

  • Open SQL Server Configuration Manager on the Windows Server 2025 instance.
  • Navigate to SQL Server Network Configuration > Protocols for MSSQLSERVER.
  • Ensure TCP/IP is enabled, as disabled network protocols can sometimes cause provider communication errors that mimic result set issues.
  • Restart the SQL Server (MSSQLSERVER) service via services.msc.

Alternative or Verification Steps

  • Verification: Run the specific stored procedure directly in SQL Server Management Studio (SSMS) to confirm it returns multiple result sets correctly; if it works in SSMS but fails in the app, the issue is strictly confined to the client-side provider or code logic.
  • Alternative: If modifying code is not immediately possible, refactor the stored procedure to use output parameters or combine result sets using UNION ALL to force a single result set return, bypassing the need for multi-set handling entirely.

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

Troubleshooting Guide: SQL Server Error 10033

Why This Error Happens

Error 10033 typically occurs when SQL Server’s query optimizer attempts to use an index-based access path (such as an OLE DB or linked server index scan/seek) against a data source that either lacks the referenced index or whose provider does not expose index scan capabilities. This is common with linked servers pointing to non-relational sources (Excel, flat files, certain ODBC/OLE DB providers) or when an index was dropped/renamed on the remote source but SQL Server’s cached metadata still references it. It can also surface after a provider update changes how indexes are exposed through the OLE DB rowset interface.

Step-by-Step Resolution Guide

Step 1: Identify the Data Source and Provider Involved

  • Check the query or job that triggered the error and determine if it uses a linked server, OPENROWSET, or OPENQUERY.
  • Run EXEC sp_linkedservers; and EXEC sp_helpserver; in SQL Server Management Studio (SSMS) to confirm the provider name (e.g., Microsoft.ACE.OLEDB.16.0, MSDASQL).
  • Note the exact index name referenced in the error message text for cross-checking in Step 2.

Step 2: Verify and Rebuild the Index on the Remote/External Source

  • Connect directly to the external data source (Excel file, Access database, or third-party system) and confirm the index still exists.
  • If the index was dropped or renamed, recreate it with the original name expected by SQL Server, or update the linked server query to remove the index hint.
  • For Excel/Access sources, open the file and confirm no corruption has occurred to the index/key structure; repair the file using Compact and Repair if using Access.

Step 3: Update or Reconfigure the OLE DB/ODBC Provider Settings

  • Open SQL Server Management Studio > Server Objects > Linked Servers > right-click the provider > Properties.
  • Under Provider Options, ensure Allow InProcess and Index as Access Path are enabled (right-click provider under Server Objects > Linked Servers > Providers).
  • On Windows Server 2025 / Windows 11, confirm the 64-bit provider driver is installed at C:\Program Files\Common Files\System\Ole DB\ and matches the SQL Server 2025 architecture (x64).
  • Restart the SQL Server service via services.msc or run:
net stop MSSQLSERVER && net start MSSQLSERVER

Step 4: Clear Cached Metadata and Refresh Statistics

  • Execute EXEC sp_refreshsqlmodule 'YourViewOrProcName'; if the error originates from a stored procedure or view referencing the linked source.
  • Run DBCC FREEPROCCACHE; to clear any stale execution plans that reference the outdated index.
  • Re-run the original query to confirm the optimizer generates a new plan without the invalid index reference.

Alternative or Verification Steps

  • Re-execute the failing query or scheduled job in SSMS and confirm no Error 10033 appears in the SQL Server Logs (SSMS > Management > SQL Server Logs) or Windows Event Viewer under Applications and Services Logs > MSSQLSERVER.
  • If the error persists, bypass the index entirely by rewriting the query using OPENQUERY with a pass-through SQL statement instead of relying on SQL Server’s native index access path for that linked source.

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

Troubleshooting Guide: SQL Server Error 10027 – “Command Was Not Prepared”

Why This Error Happens

Error 10027 typically occurs when a client application attempts to execute a previously prepared statement (via sp_prepare or an ODBC/OLE DB prepared command) that SQL Server has already discarded from its internal cache. This can happen due to connection pooling issues, a mismatch between the client-side statement handle and server-side state, or because the underlying prepared statement cache was invalidated by a schema change, failover, or server restart. In some cases, corrupted client driver files (ODBC/OLE DB) on Windows Server 2025 or Windows 11 can also cause the handle reference to desync from the server.

Step-by-Step Resolution Guide

Step 1: Verify Client Driver Version and Integrity

  • Confirm you are using an updated ODBC Driver or OLE DB Provider compatible with SQL Server 2025 (minimum: ODBC 18.x or MSOLEDBSQL 19.x).
  • Navigate to C:\Windows\System32\msodbcsql18.dll and check file properties for version consistency.
  • Reinstall the driver if corruption is suspected: run msiexec /x {ProductCode} followed by a fresh install from the official Microsoft Download Center.

Step 2: Clear and Reset Connection Pooling

  • Open ODBC Data Source Administrator (odbcad32.exe) and disable connection pooling temporarily for the affected DSN to test if pooling is causing stale prepared handles.
  • In application connection strings, add Pooling=false; temporarily to confirm the issue is pooling-related.
  • If confirmed, reduce the connection pool timeout value in SQLSetConnectAttr or your application config (e.g., .NET Max Pool Size and Connection Lifetime settings) to force fresher connections.

Step 3: Invalidate and Re-issue Prepared Statements

  • Modify client application logic to call sp_unprepare before re-preparing a statement if a schema change (ALTER TABLE, index rebuild) has occurred mid-session.
  • For custom applications, wrap prepared statement execution in a try/catch that re-prepares the statement automatically on Error 10027 instead of failing outright.
  • Example T-SQL check:
  EXEC sp_unprepare @handle;
  EXEC sp_prepare @handle OUTPUT, @params, @stmt;

Step 4: Review SQL Server Error Logs and Service Health

  • Open SQL Server Configuration Manager on Windows Server 2025 and confirm the Database Engine service is running without unexpected restarts.
  • Check C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Log\ERRORLOG for correlating failover, AlwaysOn, or memory pressure events that may have cleared the plan cache.
  • If AlwaysOn Availability Groups are in use, confirm that a failover event did not occur during the session lifetime, as this invalidates all prepared handles.

Alternative or Verification Steps

  • Run a load test using SQL Server Profiler or Extended Events to trace Prepare SQL and Exec Prepared SQL events, confirming no handle reuse errors occur after driver/pooling fixes.
  • If the issue persists, bypass prepared statements entirely for the affected query by switching to sp_executesql with inline parameters as a stable workaround.

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

Troubleshooting Guide: SQL Server Error 10028 — Authentication Failed

Why This Error Happens

Error 10028 typically occurs when SQL Server 2025 cannot validate the credentials presented by a client due to a mismatch in authentication protocols, such as an attempt to use Windows Authentication over a connection that only supports SQL Authentication (or vice versa). This can also stem from expired or misconfigured Kerberos tickets/SPNs on Windows Server 2025, or corrupted security tokens in the Local Security Authority (LSA) cache. Additionally, Group Policy restrictions on Windows 11 clients may block NTLM fallback, causing the handshake to fail silently before credentials are even checked.

Step-by-Step Resolution Guide

Step 1: Verify the SQL Server Authentication Mode

  • Open SQL Server Management Studio (SSMS) and right-click the server instance, then select Properties.
  • Navigate to the Security page and confirm whether SQL Server and Windows Authentication mode is selected (required for mixed-mode logins).
  • If you changed this setting, restart the SQL Server service via services.msc or run NET STOP MSSQLSERVER && NET START MSSQLSERVER in an elevated Command Prompt.

Step 2: Check and Repair Kerberos/SPN Configuration

  • Open an elevated Command Prompt on the Domain Controller or SQL Server host.
  • Run setspn -L <SQLServiceAccount> to list existing Service Principal Names and check for duplicates or missing entries.
  • If the SPN is missing, register it manually using:
    setspn -A MSSQLSvc/<ServerFQDN>:1433 <DomainDoman\SQLServiceAccount>
  • Restart the SQL Server service to force Kerberos ticket renegotiation.

Step 3: Clear Cached Credentials and LSA Tokens

  • On the Windows 11 client machine, open Command Prompt as Administrator.
  • Run klist purge to clear any stale Kerberos tickets causing the authentication mismatch.
  • Navigate to Control Panel > Credential Manager and remove any saved entries related to the SQL Server instance under “Windows Credentials.”

Step 4: Validate Group Policy and NTLM Settings

  • Open the Local Group Policy Editor (gpedit.msc) on the Windows Server 2025 machine.
  • Go to Computer Configuration > Windows Settings > Security Settings > Local Policies > Security Options.
  • Ensure Network Security: LAN Manager authentication level is set to “Send NTLMv2 response only” to allow fallback authentication if Kerberos fails.
  • Apply the policy and run gpupdate /force to push the changes immediately.

Alternative or Verification Steps

  • To verify the fix, attempt to reconnect via SSMS using both a Windows Authenticated account and a SQL Login; successful connection without the 10028 pop-up confirms resolution.
  • If the error persists, check the SQL Server Error Log (via EXEC sp_readerrorlog;) for specific “Login failed” details that might point to a firewall block on port 1433 rather than a credential issue.

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

Troubleshooting Guide: SQL Server Error 10025 — “Provider Caused a Server Fault in an External Process”

Why This Error Happens

This error typically occurs when SQL Server 2025 communicates with an external OLE DB provider or linked server component that crashes or becomes unresponsive, often due to a corrupted or outdated provider DLL. It can also stem from insufficient permissions on the external process account (especially under the new Windows Server 2025 process isolation model) or from the external provider attempting to access memory/resources blocked by enhanced security sandboxing. In many cases, a mismatch between the 64-bit SQL Server engine and a 32-bit (or incompatible) external provider triggers this fault.

Step-by-Step Resolution Guide

Step 1: Verify and Reinstall the External Provider

  • Open SQL Server Management Studio (SSMS) and check linked server properties under Server Objects > Linked Servers.
  • Confirm the OLE DB provider (e.g., MSOLEDBSQL, Microsoft.ACE.OLEDB.16.0) is installed and matches SQL Server’s architecture (64-bit).
  • Reinstall the provider from the official Microsoft Download Center if corruption is suspected.
  • Run sc query MSSQLSERVER to confirm the SQL Server service is running normally post-reinstall.

Step 2: Adjust Provider and Process Isolation Settings

  • Navigate to Server Objects > Linked Servers > Providers in SSMS, right-click the provider, and enable “Allow inprocess” only if the provider is stable; otherwise, leave it disabled to force out-of-process isolation.
  • Under Windows Server 2025’s enhanced App Container sandboxing, verify the SQL Server service account has explicit permissions via Component Services > DCOM Config for the provider in question.
  • Restart the SQL Server service: Restart-Service -Name MSSQLSERVER -Force (PowerShell, run as Administrator).

Step 3: Check Windows Event Viewer and Dump Files

  • Open Event Viewer > Windows Logs > Application and filter for Event ID 10025.
  • Correlate the timestamp with any .mdmp (mini-dump) files located in C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\LOG\.
  • Review the dump using WinDbg or send it to Microsoft Support if the stack trace points to a third-party DLL.

Step 4: Update SQL Server and OS Patches

  • Confirm you are running the latest Cumulative Update (CU) for SQL Server 2025 via SELECT @@VERSION;.
  • Apply any pending Windows Updates via Settings > Windows Update, specifically security patches affecting COM/DCOM and process isolation.
  • Reboot the server and re-test the failing query or linked server connection.

Alternative or Verification Steps

  • Run the original query or linked server call again and confirm no Error 10025 appears in sys.dm_os_ring_buffers or the SQL Server error log (EXEC sp_readerrorlog;).
  • If the issue persists, bypass the external provider temporarily by using OPENROWSET with a different, verified driver to isolate whether the fault is provider-specific or SQL Server configuration-specific.

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

Troubleshooting Guide: SQL Server Error 10026 – “No Command Text Was Set”

Why This Error Happens

This error typically occurs when a SQL Server Agent job step, linked server query, or OLE DB/ADO command object attempts to execute against a data source without a valid command string being assigned to it. It often results from a corrupted job step definition, an improperly configured linked server provider, or an application/script that passes a null or empty string to the CommandText property before execution. In some cases, this can also surface after an in-place upgrade to SQL Server 2025 when legacy job steps retain references to deprecated provider syntax.

Step-by-Step Resolution Guide

Step 1: Verify the SQL Agent Job Step Configuration

  • Open SQL Server Management Studio (SSMS) and connect to the instance reporting the error.
  • Navigate to SQL Server Agent > Jobs, right-click the failing job, and select Properties > Steps.
  • Check the Command text box for the specific step — if it is blank, manually re-enter the required T-SQL or command syntax.
  • Save changes and run the job manually to confirm the command text persists after closing the dialog.

Step 2: Inspect Linked Server and Provider Settings

  • Run the following query to identify affected linked servers:
EXEC sp_linkedservers;
  • Confirm the provider (e.g., MSOLEDBSQL19 or MSOLEDBSQL for SQL Server 2025) is correctly installed under:
    C:\Program Files\Microsoft SQL Server\160\Shared\
  • Re-create the linked server command using sp_addlinkedserver and sp_addlinkedsrvlogin if the provider path appears broken or missing.

Step 3: Check Application or Script-Level Command Binding

  • If the error originates from a custom application (C#, PowerShell, or SSIS package), inspect the code for instances where SqlCommand.CommandText or OleDbCommand.CommandText is set conditionally.
  • Ensure no code path allows the command object to be executed before the CommandText property is populated, such as:
if (string.IsNullOrEmpty(cmd.CommandText))
{
    throw new InvalidOperationException("Command text is missing.");
}
  • For SSIS packages, open the Execute SQL Task editor and verify the SQLStatement property is not empty or referencing an unresolved variable.

Step 4: Repair or Recreate the Corrupted Job/Package

  • If the job step or SSIS package continues to fail, export the job definition as a script via Right-click Job > Script Job As > CREATE To.
  • Delete and recreate the job using the exported script, manually re-validating each step’s command text field during re-creation.
  • Restart the SQL Server Agent service on Windows Server 2025 via services.msc to clear any cached job metadata.

Alternative or Verification Steps

  • To verify the fix, re-run the job or query manually and check the SQL Server Agent Job History for a success status with no Error 10026 entries.
  • If the issue persists, use SQL Server Profiler or Extended Events to trace the exact RPC or batch call triggering the empty command text, which can help isolate whether the root cause lies in the client driver or the server-side job definition.

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

Microsoft SQL Server 2025 Error 10024: Permission Denied Operation

Why This Error Happens

Error 10024 typically occurs when the SQL Server login or Windows account executing the operation lacks the specific server-level or database-level permissions required for that task, such as ALTER, CONTROL, or IMPERSONATE rights. This is common after a security hardening pass, a failed login-to-user mapping, or when a service account’s token does not propagate correctly due to UAC restrictions on Windows Server 2025. Additionally, orphaned users resulting from a database restore or migration can trigger this provider-level permission rejection even if the login appears valid.

Step-by-Step Resolution Guide

Step 1: Verify Current Login and Role Membership

  • Open SQL Server Management Studio (SSMS) and connect using an account with sysadmin privileges.
  • Run the following query to check the current execution context: SELECT SUSER_NAME(), USER_NAME();
  • Check if the login is mapped to the correct database role via Security > Logins > [Your Login] > User Mapping.

Step 2: Grant Explicit Permissions via T-SQL

  • Open a new query window targeting the specific database throwing the error.
  • Execute the following to grant control if the user is missing rights to the object: GRANT CONTROL ON DATABASE::[YourDatabaseName] TO [YourUserName];
  • If the error relates to a specific stored procedure or table, use: GRANT EXECUTE ON OBJECT::[SchemaName].[ProcedureName] TO [YourUserName];

Step 3: Fix Orphaned Users (Post-Migration Fix)

  • Run sp_change_users_login 'Report'; to identify any mismatches between the SID in the database and the server login.
  • If an orphan is found, resync the user using: ALTER USER [YourUserName] WITH LOGIN = [YourUserName];
  • Restart the SQL Server service via services.msc on Windows Server 2025 to clear the cached permission token.

Step 4: Check Windows Integrated Security Settings

  • Navigate to Control Panel > User Accounts or lusrmgr.msc on the Windows 11/Server 2025 machine to ensure the service account is part of the local SQLServerMSSQLUser group.
  • Verify that User Account Control (UAC) is not blocking the elevation request for the SQL Server Agent service.

Alternative or Verification Steps

  • Verification: Re-run the specific query or application action that triggered the error 10024; success is confirmed if the data returns without a provider exception.
  • Alternative: If permissions appear correct but the error persists, drop and recreate the specific database user (not the login) to force a refresh of the internal security catalog: DROP USER [YourUserName]; CREATE USER [YourUserName] FOR LOGIN [YourUserName];

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

Troubleshooting Guide: SQL Server Error 10022 – “The provider called a method from IRowsetNotify in the consumer”

Why This Error Happens

This error typically occurs when a linked server or OLE DB provider attempts to use asynchronous notification callbacks (IRowsetNotify interface) that the consumer application does not support or has not implemented correctly. It is commonly triggered by outdated or misconfigured OLE DB providers, corrupted provider DLL registrations, or incompatible driver versions being used with SQL Server 2025 on Windows Server 2025/Windows 11. In some cases, this also surfaces when distributed queries are executed against a linked server with notification-based row fetching enabled, but the underlying provider configuration does not align with the consumer’s capabilities.

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., MSOLEDBSQL, SQLNCLI) and check the version under Properties.
  • Download and install the latest OLE DB Driver for SQL Server from the official Microsoft Download Center.
  • Restart the SQL Server service after installation: net stop MSSQLSERVER && net start MSSQLSERVER.

Step 2: Reconfigure Linked Server Provider Options

  • Open a query window in SSMS and run the following to disable unsupported notification settings:
EXEC sp_MSset_oledb_prop N'MSOLEDBSQL', N'AllowInProcess', 1;
EXEC sp_MSset_oledb_prop N'MSOLEDBSQL', N'DynamicParameters', 1;
  • Disable the “Nested Queries” and “Non Transacted Updates” options if they are not required, as these can trigger rowset notification conflicts.
  • Right-click the Linked Server, go to Properties > Server Options, and ensure “Collation Compatible” is set appropriately for your environment.

Step 3: Re-register the Provider DLL

  • Open an elevated Command Prompt on Windows Server 2025/Windows 11.
  • Locate the provider DLL, typically found at: C:\Program Files\Microsoft SQL Server\160\Shared\msoledbsql.dll (adjust path for SQL Server 2025 build number).
  • Re-register the DLL using: regsvr32 "C:\Program Files\Microsoft SQL Server\160\Shared\msoledbsql.dll".
  • Restart the SQL Server and SQL Server Agent services from the Services console (services.msc).

Step 4: Check for Corrupted Provider Configuration in Registry

  • Open regedit and navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\Providers.
  • Verify that the provider key for your OLE DB driver has AllowInProcess set to 1 (DWORD).
  • If the key is missing or corrupted, delete it and let SQL Server regenerate it by restarting the SQL Server service.

Alternative or Verification Steps

  • Run a test query against the linked server using SELECT * FROM OPENQUERY(LinkedServerName, 'SELECT 1') to confirm the error no longer appears.
  • If the issue persists, switch the provider from a notification-based rowset model to a standard forward-only, read-only cursor by setting SET FMTONLY OFF and using SET NOCOUNT ON in the query session to bypass the IRowsetNotify dependency entirely.

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

Troubleshooting Guide: SQL Server Error 10023 – “The Provider Does Not Support the Necessary Method”

Why This Error Happens

Error 10023 typically occurs when SQL Server 2025 attempts to use a linked server OLE DB provider that lacks support for a required method, often due to an outdated, corrupted, or improperly registered provider DLL. This can also stem from mismatched provider configurations (e.g., 32-bit vs. 64-bit) or missing provider-specific flags such as DisallowAdHocAccess, DynamicParameters, or NestedQueries not being enabled correctly. In some cases, Windows Server 2025 security policies or COM+ permissions block the provider from exposing the necessary interface to SQL Server.

Step-by-Step Resolution Guide

Step 1: Verify and Update the OLE DB Provider

  • Confirm which linked server provider is throwing the error using sys.servers and sp_helpserver.
  • Check the provider version against Microsoft’s compatibility matrix for SQL Server 2025.
  • Download and install the latest provider update (e.g., MSOLEDBSQL, Oracle OLE DB, or third-party ODBC bridge) from the vendor.
  • Restart the SQL Server service after installation: net stop MSSQLSERVER && net start MSSQLSERVER.

Step 2: Reconfigure Linked Server Provider Options

  • Open SQL Server Management Studio (SSMS) and navigate to Server Objects > Linked Servers > Providers.
  • Right-click the provider in question and select Properties.
  • Enable the following flags if unchecked: Nested Queries, Level zero only, and Allow InProcess.
  • Alternatively, run this T-SQL command to enable InProcess mode:
  EXEC sp_MSset_oledb_prop N'MSOLEDBSQL', N'AllowInProcess', 1

Step 3: Check 32-bit vs 64-bit Provider Mismatch

  • Ensure SQL Server 2025 (64-bit) is not attempting to load a 32-bit-only provider.
  • Navigate to C:\Windows\SysWOW64\ and C:\Windows\System32\ to confirm the correct provider DLL architecture is registered.
  • Re-register the correct DLL using:
  regsvr32 "C:\Program Path\provider.dll"

Step 4: Validate COM+ and DCOM Permissions

  • Open Component Services (dcomcnfg.exe) on Windows Server 2025 / Windows 11.
  • Navigate to Component Services > Computers > My Computer > DCOM Config.
  • Locate the provider entry, right-click Properties, and ensure the SQL Server service account has Local Launch and Local Activation permissions under the Security tab.

Step 5: Rebuild the Linked Server Definition

  • Drop and recreate the linked server to clear any cached provider metadata:
  EXEC sp_dropserver 'LinkedServerName', 'droplogins';
  EXEC sp_addlinkedserver 'LinkedServerName', 'ProviderName';
  • Re-test connectivity using EXEC sp_testlinkedserver 'LinkedServerName';.

Alternative or Verification Steps

  • Run a simple distributed query (e.g., SELECT * FROM OPENQUERY(LinkedServerName, 'SELECT 1')) to confirm the provider now responds correctly without throwing Error 10023.
  • If the issue persists, consider switching to a Microsoft-certified ODBC driver instead of a legacy OLE DB provider, as OLE DB providers are being phased out in favor of ODBC in newer SQL Server releases.

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

Troubleshooting Guide: SQL Server Error 10011 – Access Denied

Why This Error Happens

Error 10011 typically occurs when the Windows account running the SQL Server service lacks the necessary permissions to access a required resource, such as a registry key, file directory, or named pipe/port binding. This is often triggered after a security policy update, a service account change, or a Windows Server 2025 hardening script that revokes inherited permissions. In some cases, corrupted ACLs (Access Control Lists) on the SQL Server installation directory can also trigger this access denial during service startup or client connection attempts.

Step-by-Step Resolution Guide

Step 1: Verify the SQL Server Service Account Permissions

  • Open Services.msc and locate the SQL Server (MSSQLSERVER) service.
  • Check the Log On As account under the “Log On” tab.
  • Ensure this account has “Full Control” on the SQL Server install directory, typically located at C:\Program Files\Microsoft SQL Server\MSSQL16.MSSQLSERVER\MSSQL\.
  • Right-click the folder, go to Properties > Security, and add the service account if missing.

Step 2: Reset Registry Permissions for SQL Server

  • Press Win + R, type regedit, and navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server.
  • Right-click the key and select Permissions.
  • Ensure the SQL Server service account and NT AUTHORITY\SYSTEM have Full Control.
  • Apply changes and restart the SQL Server service to test.

Step 3: Check Windows Firewall and Port Binding Conflicts

  • Open Windows Defender Firewall with Advanced Security.
  • Verify that TCP port 1433 (or your custom SQL port) is not blocked or claimed by another process.
  • Run the following command in an elevated PowerShell window to check for conflicts:
  netstat -ano | findstr :1433
  • If a conflicting process is found, terminate it or reconfigure SQL Server to use an alternate port via SQL Server Configuration Manager.

Step 4: Run SQL Server Setup Repair

  • Open Control Panel > Programs > Programs and Features.
  • Select Microsoft SQL Server 2025 and click Uninstall/Change.
  • Choose the Repair option from the SQL Server Installation Center wizard.
  • Allow the repair process to complete, then restart the server.

Alternative or Verification Steps

  • To verify the fix, attempt to connect via SQL Server Management Studio (SSMS) using both Windows Authentication and SQL Authentication to confirm access is restored.
  • If the issue persists, create a new local Windows service account with minimal required privileges, assign it via SQL Server Configuration Manager, and restart the service to isolate corrupted profile permissions.

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

Troubleshooting Guide: SQL Server Error 10021 — “Execution Terminated by the Provider Because a Resource Limit Was Reached”

Why This Error Happens

This error typically occurs when a linked server query (often via OLE DB or ODBC providers) exceeds memory, timeout, or row-processing thresholds configured on the provider or remote data source. It can also be triggered by insufficient max server memory allocation on SQL Server 2025, causing the query execution engine to forcibly terminate distributed queries. In some cases, outdated or misconfigured provider drivers (e.g., MSOLEDBSQL, ODBC Driver 18) fail to negotiate resource limits correctly with Windows Server 2025’s updated memory management APIs.

Step-by-Step Resolution Guide

Step 1: Verify and Adjust SQL Server Memory Configuration

  • Open SQL Server Management Studio (SSMS) and connect to the instance.
  • Run EXEC sp_configure 'max server memory'; to check current allocation.
  • Increase the value if it’s too restrictive relative to available system RAM:
    EXEC sp_configure 'max server memory', 16384; RECONFIGURE;
  • Restart the SQL Server service via services.msc or net stop MSSQLSERVER && net start MSSQLSERVER.

Step 2: Update and Reconfigure the Linked Server Provider

  • Navigate to SSMS > Server Objects > Linked Servers > Providers.
  • Right-click the provider (e.g., MSOLEDBSQL) and open Properties.
  • Ensure “Allow InProcess” is checked only if the provider is trusted and stable.
  • Verify the provider is updated to the latest version compatible with Windows Server 2025:
    Download from Microsoft’s official OLE DB Driver download page.
  • Reinstall the driver if corruption is suspected:
    msiexec /x {ProductCode} /quiet followed by a fresh install.

Step 3: Increase Query Timeout and Resource Governor Limits

  • Check if Resource Governor is enabled and restricting the session:
    SELECT * FROM sys.resource_governor_workload_groups;
  • If a custom workload group has low MAX_MEMORY_PERCENT, adjust it:
    ALTER WORKLOAD GROUP [YourGroupName] WITH (MAX_MEMORY_PERCENT = 50); ALTER RESOURCE GOVERNOR RECONFIGURE;
  • Increase the remote query timeout setting:
    EXEC sp_configure 'remote query timeout', 0; RECONFIGURE;

Step 4: Review Windows Server 2025 System Resource Allocation

  • Open Task Manager > Performance tab and confirm no memory/CPU bottleneck exists at the OS level.
  • Check Event Viewer > Windows Logs > Application for correlating MSSQLSERVER or OLEDB provider errors.
  • Ensure Virtual Memory / Pagefile settings (sysdm.cpl > Advanced > Performance Settings) are set to “System Managed” or sized appropriately (1.5x RAM minimum).

Alternative or Verification Steps

  • Re-run the original query or linked server call; if successful without the 10021 error, the resource limit has been resolved.
  • As an alternative, break large distributed queries into smaller batched transactions using OPENQUERY instead of four-part naming conventions, which often bypasses provider-level resource ceilings.

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

Troubleshooting Guide: SQL Server Error 10009 – “The provider did not give any information about the error”

Why This Error Happens

This error typically occurs when the SQL Server Network Interface (SNI) layer cannot establish or maintain a connection to the target instance due to an underlying transport-level failure. Common root causes include a misconfigured or disabled network protocol (TCP/IP or Named Pipes), an expired or untrusted SSL/TLS certificate used for encrypted connections, or a firewall/port conflict on Windows Server 2025 blocking the SQL Server listener port. Because the OLE DB/ODBC provider abstracts the actual socket error, it surfaces this generic message instead of the specific network exception.

Step-by-Step Resolution Guide

Step 1: Verify SQL Server Network Protocols

  • Open SQL Server Configuration Manager (sqlserverManager17.msc for SQL Server 2025).
  • Navigate to SQL Server Network Configuration > Protocols for MSSQLSERVER.
  • Confirm that TCP/IP is set to Enabled and Named Pipes is enabled if used by legacy apps.
  • Restart the SQL Server service after making changes: net stop MSSQLSERVER && net start MSSQLSERVER.

Step 2: Check Certificate and Encryption Settings

  • Go to SQL Server Configuration Manager > SQL Server Network Configuration > Protocols > Certificate tab.
  • Ensure the bound certificate has not expired and matches the server’s FQDN.
  • If using Force Encryption, validate the cert chain with: certutil -verify -urlfetch <certname>.cer.
  • If the certificate is invalid, either renew it via your internal CA or temporarily disable “Force Encryption” to isolate the issue.

Step 3: Inspect Windows Firewall and Port Configuration

  • Confirm SQL Server is listening on the expected port (default 1433) via netstat -ano | findstr 1433.
  • Check Windows Defender Firewall with Advanced Security for an inbound rule allowing TCP 1433 (or your custom port).
  • If using dynamic ports, verify the SQL Browser service (SQLBrowser) is running: sc query SQLBrowser.

Step 4: Review SQL Server Error Logs and Event Viewer

  • Open SQL Server Management Studio (SSMS) and run: EXEC xp_readerrorlog;
  • Cross-reference timestamps with Windows Event Viewer > Application and System logs for Event ID 10009.
  • Look for related SNI or TDS errors that pinpoint the exact network layer failure (e.g., handshake failure, timeout).

Step 5: Validate Client Connectivity String and Drivers

  • Ensure the client application uses an updated ODBC Driver 18+ or OLE DB Driver for SQL Server compatible with SQL Server 2025.
  • Test connectivity using sqlcmd -S <ServerName> -U <User> -P <Password> -C (the -C flag trusts the server certificate for testing).

Alternative or Verification Steps

  • Use SQL Server Management Studio to manually connect via TCP/IP with encryption enabled; a successful login confirms the fix.
  • If the issue persists, create a fresh self-signed certificate via SQL Server Configuration Manager and rebind it, then retest the connection from a remote client machine.

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

Troubleshooting Guide: Error 10010 – “The data necessary to complete this operation was not yet available to the provider” (SQL Server 2025)

Why This Error Happens

This error typically occurs when SQL Server’s OLE DB provider attempts to retrieve metadata or result sets before the underlying data stream has fully initialized, often due to asynchronous operation timing issues. It can also stem from corrupted linked server configurations, outdated OLE DB/ODBC drivers, or network latency between SQL Server 2025 and a remote data source. In some cases, insufficient permissions on the provider or a misconfigured COM+ component on Windows Server 2025 / Windows 11 prevents the provider from completing the handshake in time.

Step-by-Step Resolution Guide

Step 1: Verify and Update the OLE DB/ODBC Provider

  • Open SQL Server Management Studio (SSMS) and navigate to Server Objects > Linked Servers > Providers.
  • Right-click the relevant provider (e.g., MSOLEDBSQL, SQLNCLI) and confirm the version matches the latest release for SQL Server 2025.
  • Download and install the updated driver from the official Microsoft Download Center if outdated.
  • Restart the SQL Server (MSSQLSERVER) service after installation via services.msc.

Step 2: Adjust Provider Options for Asynchronous Operations

  • Run the following T-SQL to disable “Allow InProcess” temporarily for troubleshooting:
EXEC sp_MSset_oledb_prop N'MSOLEDBSQL', N'AllowInProcess', 1;
  • Re-run your query to check if the timing-related error persists.
  • If resolved, review application-side connection strings for Async=True flags that may need adjustment.

Step 3: Check Network and DCOM Permissions

  • Open Component Services (dcomcnfg.exe) on Windows Server 2025 / Windows 11.
  • Navigate to Component Services > Computers > My Computer > DCOM Config.
  • Locate the relevant provider entry, right-click Properties, and ensure the SQL Server Service Account has Local Launch and Local Activation permissions.
  • Confirm firewall rules allow traffic on port 1433 (or your custom SQL port) using Test-NetConnection -ComputerName <ServerName> -Port 1433.

Step 4: Rebuild or Recreate the Linked Server

  • Drop the problematic linked server:
EXEC sp_dropserver 'LinkedServerName', 'droplogins';
  • Recreate it with explicit provider and data source settings:
EXEC sp_addlinkedserver 'LinkedServerName', 'SQL Server';
  • Test connectivity using EXEC sp_testlinkedserver 'LinkedServerName';.

Alternative or Verification Steps

  • Run EXEC sp_linkedservers; and execute a sample distributed query to confirm the error no longer appears in SQL Server Error Logs or Event Viewer (Event ID 10010).
  • If the issue persists, enable Profiler/Extended Events tracing on the OLE DB provider calls to pinpoint the exact timing failure, or consider switching the linked server provider to a more stable alternative (e.g., migrating from SQLNCLI to MSOLEDBSQL).

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

Troubleshooting Guide: SQL Server Error 10008 — “The Provider Terminated the Operation”

Why This Error Happens

This error typically occurs when a linked server or OLE DB provider loses connectivity mid-transaction due to network instability, connection pooling corruption, or an outdated/misconfigured provider driver. It can also stem from firewall interference on Windows Server 2025, overly aggressive connection timeout settings, or insufficient permissions for the service account accessing the remote data source. In many cases, this is a transient communication failure between SQL Server 2025 and the underlying data provider rather than a permanent corruption issue.

Step-by-Step Resolution Guide

Step 1: Verify and Reset the Linked Server Connection

  • Open SQL Server Management Studio (SSMS) and navigate to Server Objects > Linked Servers.
  • Right-click the affected linked server and select Test Connection to confirm current status.
  • If the test fails, drop and recreate the linked server using sp_dropserver and sp_addlinkedserver with updated credentials.

Step 2: Update or Reconfigure the OLE DB Provider

  • Navigate to Server Objects > Linked Servers > Providers in SSMS and locate the provider in question (e.g., MSOLEDBSQL, SQLNCLI).
  • Right-click the provider, select Properties, and ensure “Allow inprocess” is enabled for stability.
  • Download and install the latest provider version from the official Microsoft Download Center, ensuring compatibility with Windows Server 2025.
  • Restart the SQL Server service via services.msc or run NET STOP MSSQLSERVER && NET START MSSQLSERVER in an elevated Command Prompt.

Step 3: Adjust Network and Timeout Settings

  • Open SQL Server Configuration Manager and check that TCP/IP is enabled under SQL Server Network Configuration > Protocols.
  • Increase the Remote Query Timeout value in Server Properties > Connections (set to 0 for unlimited, or a higher value like 600 seconds).
  • Verify Windows Firewall rules on Windows Server 2025 are not blocking outbound/inbound traffic on port 1433 using netsh advfirewall firewall show rule name=all.

Step 4: Validate Service Account Permissions

  • Open SQL Server Configuration Manager, right-click the SQL Server service, and confirm the service account under the Log On tab.
  • Ensure this account has appropriate read/write permissions on the remote resource or database being queried.
  • Use RUNAS /user:domain\serviceaccount cmd to test manual connectivity from the same security context.

Alternative or Verification Steps

  • Run the original query or job again and monitor the SQL Server Error Log (via EXEC sp_readerrorlog) to confirm Error 10008 no longer appears.
  • If the issue persists, switch the linked server provider from OLE DB to a native ODBC Driver 18 for SQL Server connection, which often resolves legacy provider termination issues on newer OS builds like Windows Server 2025.

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

Troubleshooting Guide: SQL Server Error 10006 – “The Provider Indicated an Invalid Pointer Was Used”

Why This Error Happens

This error typically occurs when a linked server or OLE DB provider attempts to pass a memory reference that has been corrupted, deallocated, or improperly initialized during a data retrieval operation. It is commonly triggered by outdated or mismatched OLE DB provider versions (such as the SQL Native Client or MSOLEDBSQL driver) that are incompatible with SQL Server 2025 on Windows Server 2025/Windows 11. Additionally, corrupted provider registration entries in the Windows Registry or insufficient permissions on the provider’s COM objects can cause the pointer validation to fail during cross-server queries.

Step-by-Step Resolution Guide

Step 1: Verify and Update the OLE DB Provider

  • Confirm which provider is being used by the linked server via sp_helplinkedsrvlogin or checking SSMS > Server Objects > Linked Servers > Properties.
  • Download and install the latest MSOLEDBSQL driver from the official Microsoft Download Center, ensuring compatibility with SQL Server 2025.
  • Uninstall any legacy SQLNCLI (SQL Native Client) providers if they are no longer required, as these are deprecated and often cause pointer conflicts.

Step 2: Check and Repair Provider Permissions in Registry

  • Open the Registry Editor (regedit.exe) and navigate to HKEY_CLASSES_ROOT\CLSID\{Provider CLSID}.
  • Right-click the key, select Permissions, and ensure the SQL Server Service Account has at least Read and Execute permissions.
  • Verify the “Allow in Process” setting for the provider by running: EXEC sp_MSset_oledb_prop 'MSOLEDBSQL', 'AllowInProcess', 1

Step 3: Re-Configure the Linked Server Settings

  • Drop and recreate the linked server definition using T-SQL to force a clean handshake with the provider:
  • EXEC sp_dropserver 'LinkedServerName', 'droplogins';
  • EXEC sp_addlinkedserver 'LinkedServerName', 'SQL Server';
  • Restart the SQL Server (MSSQLSERVER) service via services.msc to clear any cached invalid memory pointers from the previous session.

Step 4: Validate Windows Server Memory Allocation

  • Check the Windows Event Viewer (eventvwr.msc) under Windows Logs > Application for any correlating MSSQLSERVER or MSDTC errors that might indicate memory exhaustion.
  • Ensure Max Server Memory in SQL Server Properties is not set too high relative to the physical RAM available on the Windows Server 2025 host, as this can cause pointer allocation failures under load.

Alternative or Verification Steps

  • Verification: Re-run the specific query or stored procedure that triggered the error (e.g., a distributed query using OPENQUERY or a linked server call) and monitor the SQL Server Error Log for the absence of Error 10006.
  • Alternative: If the error persists, bypass the OLE DB provider entirely for that specific transaction by switching the connection method to ODBC via a Linked Server configuration, as ODBC drivers often handle pointer memory management differently than OLE DB.

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

Troubleshooting Guide: SQL Server Error 10007 – “The Provider Indicated an Invalid Handle Was Used”

Why This Error Happens

This error typically occurs when a connection handle or DBNETLIB/OLE DB provider reference becomes invalid due to an unstable or interrupted network connection between the client and Microsoft SQL Server 2025. It can also result from corrupted SQL Native Client (SNAC) or ODBC driver components on Windows Server 2025 or Windows 11, outdated connection pooling states, or firewall/antivirus software intermittently terminating TCP sessions mid-query. In some cases, this is triggered by a mismatch between the client driver version and the SQL Server 2025 engine version.

Step-by-Step Resolution Guide

Step 1: Verify and Reset the Network Connection

  • Open Command Prompt as Administrator and run ping <SQLServerName> to check for packet loss or latency spikes.
  • Run netstat -an | find "1433" to confirm the SQL Server port is actively listening and not being reset.
  • Disable any third-party firewall/antivirus temporarily to rule out mid-session connection drops.

Step 2: Update or Reinstall the SQL Client Driver

  • Navigate to Control Panel > Programs and Features and locate “Microsoft OLE DB Driver for SQL Server” or “ODBC Driver for SQL Server.”
  • Uninstall the existing driver and download the latest version compatible with SQL Server 2025 from the official Microsoft Download Center.
  • Reinstall and reboot the client machine to clear cached handle references.

Step 3: Clear Connection Pooling and Reset DBNETLIB Cache

  • Open SQL Server Configuration Manager and navigate to SQL Server Network Configuration > Protocols for MSSQLSERVER.
  • Restart the SQL Server (MSSQLSERVER) service to flush all active connection handles.
  • If using connection pooling in your application (e.g., ADO.NET or ODBC), set Pooling=false temporarily in the connection string to test if pooling is the cause.

Step 4: Check Event Viewer and SQL Server Error Logs

  • Open Event Viewer > Windows Logs > Application and filter for Event ID 10007.
  • Cross-reference timestamps with SQL Server’s error log located at C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Log\ERRORLOG.
  • Look for correlating network timeout or authentication failure entries occurring at the same time.

Step 5: Apply the Latest Cumulative Update (CU) for SQL Server 2025

  • Go to Microsoft Update Catalog and search for the latest Cumulative Update for SQL Server 2025.
  • Download and install the CU package, ensuring you run it with elevated administrator privileges.
  • Restart the SQL Server instance after installation completes.

Alternative or Verification Steps

  • To verify the fix, re-run the original query or application process that triggered Error 10007 and monitor the connection for at least 15-20 minutes under normal load.
  • If the issue persists, switch the client application to use a new OLE DB provider (such as MSOLEDBSQL19) instead of the legacy SQL Native Client, as deprecated providers are more prone to handle corruption on newer SQL Server versions.

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

Troubleshooting Guide: SQL Server Error 10004 – “One or More Arguments Were Reported Invalid by the Provider”

Why This Error Happens

This error typically occurs when SQL Server’s OLE DB provider receives malformed or incompatible connection arguments, often due to a mismatch between the provider version and the linked server configuration. It can also stem from corrupted provider registry settings, outdated OLE DB drivers (such as MSOLEDBSQL), or incorrect authentication parameters passed during a distributed query. In some cases, this is triggered by provider options that aren’t properly enabled at the instance level, causing SQL Server to reject the connection attempt before it even reaches the remote data source.

Step-by-Step Resolution Guide

Step 1: Verify and Update the OLE DB Provider

  • Confirm which provider is being used (e.g., MSOLEDBSQL, MSOLEDBSQL19) via sp_helplinkedsrvlogin or the Linked Servers node in SSMS.
  • Download and install the latest Microsoft OLE DB Driver for SQL Server from the official Microsoft site.
  • Restart the SQL Server service after installation to ensure the new provider DLL is loaded.

Step 2: Check Provider Options at the Instance Level

  • Open SQL Server Management Studio and navigate to Server Objects > Linked Servers > Providers.
  • Right-click the provider in question (e.g., MSOLEDBSQL) and select Properties.
  • Ensure “Allow inprocess” and “Nested queries” are enabled if your query design requires them.
  • Alternatively, run this T-SQL command to enable “Allow inprocess”:
EXEC sp_MSset_oledb_prop N'MSOLEDBSQL', N'AllowInProcess', 1

Step 3: Review Linked Server and Connection String Arguments

  • Open the Linked Server definition and check the Data Source, Catalog, and Provider String fields for typos or invalid syntax.
  • Remove any deprecated or unsupported arguments (common with older sqloledb or SQLNCLI strings carried over from legacy migrations).
  • Re-create the linked server using sp_addlinkedserver with explicit, minimal parameters to rule out hidden misconfigurations.

Step 4: Validate Authentication and Security Context

  • Confirm the linked server login mapping is correct using sp_helplinkedsrvlogin.
  • If using “Be made using this security context,” ensure the remote login has valid, non-expired credentials.
  • For Windows Authentication delegation, verify Kerberos constrained delegation is properly configured in Active Directory on Windows Server 2025.

Step 5: Clear Corrupted Provider Registry Entries (If Issue Persists)

  • Back up the registry, then navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\Providers.
  • Remove and reinstall the specific provider entry if it appears corrupted or references an invalid path.
  • Reboot the server to allow SQL Server to re-register the provider cleanly.

Alternative or Verification Steps

  • Run a test query through the linked server (e.g., SELECT * FROM OPENQUERY(LinkedServerName, 'SELECT 1')) to confirm the connection succeeds without Error 10004.
  • If the issue persists, try switching to a different provider (e.g., testing with MSOLEDBSQL19 instead of the legacy MSOLEDBSQL) to isolate whether the problem is provider-specific or configuration-specific.

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

Troubleshooting Guide: Error 10005 – “The Provider Did Not Support an Interface” (SQL Server 2025)

Why This Error Happens

This error typically occurs when SQL Server’s OLE DB provider stack encounters a mismatch between the installed provider version and the interface requested by a linked server, distributed query, or SQL Server Management Objects (SMO) call. It is commonly triggered by outdated or corrupted OLE DB provider DLLs (such as MSOLEDBSQL or legacy SQLNCLI references) that were not properly updated during a Windows Server 2025 or Windows 11 OS upgrade. In some cases, this also stems from 32-bit/64-bit provider architecture conflicts or incomplete registration of COM components in the Windows Registry.

Step-by-Step Resolution Guide

Step 1: Verify and Reinstall the OLE DB Provider

  • Confirm the Microsoft OLE DB Driver for SQL Server (MSOLEDBSQL19 or later) is installed via Control Panel > Programs and Features.
  • If missing or outdated, download the latest version from the official Microsoft Download Center.
  • Run the installer with elevated privileges: msoledbsql.msi /quiet IACCEPTMSOLEDBSQLLICENSETERMS=YES
  • Restart the SQL Server service after installation completes.

Step 2: Re-Register the Provider in Windows Registry

  • Open an elevated Command Prompt and navigate to the provider’s installation directory (typically C:\Program Files\Microsoft OLE DB Driver for SQL Server\binn\).
  • Run regsvr32 msoledbsql.dll to force re-registration of the COM interface.
  • Check Registry Editor under HKEY_CLASSES_ROOT\CLSID to confirm the provider’s CLSID entry exists and points to the correct DLL path.

Step 3: Validate Linked Server Provider Options

  • Open SQL Server Management Studio (SSMS) and navigate to Server Objects > Linked Servers.
  • Right-click the affected linked server, select Properties, and verify the Provider is set to “Microsoft OLE DB Driver for SQL Server” rather than a deprecated provider like SQLNCLI11.
  • Run the following T-SQL to update provider options if needed:
EXEC sp_serveroption 'YourLinkedServerName', 'data access', true;
EXEC sp_serveroption 'YourLinkedServerName', 'rpc out', true;

Step 4: Check for 32-bit vs 64-bit Architecture Conflicts

  • Ensure both SQL Server and the OLE DB provider are running the same architecture (64-bit is standard for SQL Server 2025).
  • If using SSIS or a 32-bit application, install the 32-bit version of MSOLEDBSQL alongside the 64-bit version.
  • Verify via Component Services (dcomcnfg.exe) > Component Services > My Computer > DCOM Config that the provider is listed correctly.

Alternative or Verification Steps

  • Test the fix by re-running the failing query or linked server connection using SELECT * FROM OPENQUERY(YourLinkedServerName, 'SELECT 1') and confirm no 10005 error appears in the SQL Server Error Log.
  • If the issue persists, use SQL Server Configuration Manager to fully uninstall and cleanly reinstall the Native Client/OLE DB provider stack, then restart the SQL Server (MSSQLSERVER) and SQL Server Agent services.

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

Troubleshooting Guide: SQL Server Error 10002 – “The Provider Did Not Implement the Functionality”

Why This Error Happens

This error typically occurs when a legacy or mismatched OLE DB provider is used to execute a method or property that it does not support, often triggered during linked server queries or distributed transactions. It can also result from using 32-bit providers on a 64-bit instance of SQL Server 2025, or from corrupted/outdated provider DLL registrations in Windows Server 2025. Additionally, incorrect provider options (such as improperly enabled “Nested Queries” or “Allow InProcess” settings) can cause the provider to reject the requested operation.

Step-by-Step Resolution Guide

Step 1: Verify the OLE DB Provider Architecture

  • Confirm whether the installed provider is 32-bit or 64-bit.
  • SQL Server 2025 on Windows Server 2025 requires 64-bit providers for full functionality.
  • Check installed providers via SSMS > Server Objects > Linked Servers > Providers.
  • If a 32-bit provider is detected, uninstall it and reinstall the correct 64-bit version from the vendor.

Step 2: Adjust Provider Options in SQL Server

  • Open SSMS and navigate to Server Objects > Linked Servers > Providers > [Your Provider].
  • Right-click and select Properties.
  • Disable “Allow InProcess” if it is causing instability, or enable it if the provider requires in-process execution for the requested method.
  • Run the following T-SQL command to update provider settings directly:
EXEC sp_MSset_oledb_prop 'YourProviderName', 'AllowInProcess', 1;
  • Restart the SQL Server service for changes to take effect.

Step 3: Update or Reinstall the Provider Driver

  • Navigate to C:\Windows\System32 (for 64-bit) or C:\Windows\SysWOW64 (for 32-bit) to locate the provider DLL files.
  • Verify the DLL version matches the latest release from the vendor’s official site.
  • Use regsvr32 "C:\Path\To\Provider.dll" to re-register the component if corruption is suspected.
  • Reboot Windows Server 2025 after reinstalling the provider.

Step 4: Review Distributed Transaction Coordinator (MSDTC) Settings

  • Open Component Services (dcomcnfg.exe) on Windows Server 2025.
  • Navigate to Component Services > Computers > My Computer > Distributed Transaction Coordinator > Local DTC.
  • Right-click Local DTC, select Properties, and ensure “Network DTC Access” and “Allow Inbound/Outbound” are enabled if the query involves cross-server transactions.
  • Apply changes and restart the MSDTC service via services.msc.

Alternative or Verification Steps

  • Run the original query or linked server test (EXEC sp_testlinkedserver 'YourLinkedServerName';) to confirm Error 10002 no longer appears.
  • If the issue persists, switch to a different provider (e.g., migrate from a legacy OLE DB provider to the Microsoft OLE DB Driver for SQL Server) as a workaround while vendor support investigates the root compatibility issue.

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

Troubleshooting Guide: Error 10003 – “The Provider Ran Out of Memory” (SQL Server 2025)

Why This Error Happens

Error 10003 typically occurs when the OLE DB provider used by SQL Server (often for linked servers, distributed queries, or SSIS data flows) exhausts the memory allocated to its process space, which is frequently caused by 32-bit provider limitations running under a 64-bit SQL Server instance. This can also result from corrupted provider DLL files, excessive memory pressure from other SQL Server components (like the buffer pool), or a system-level virtual memory/paging file misconfiguration on Windows Server 2025. In some cases, outdated or incompatible provider drivers fail to release memory handles properly, leading to a rapid exhaustion of available address space.

Step-by-Step Resolution Guide

Step 1: Verify Provider Architecture Compatibility

  • Confirm whether the OLE DB provider (e.g., Microsoft.ACE.OLEDB.16.0, SQLNCLI) is 32-bit or 64-bit.
  • Open SQL Server Management Studio (SSMS) and run: EXEC sp_configure 'show advanced options', 1; RECONFIGURE; EXEC sp_configure 'Ad Hoc Distributed Queries';
  • If using a 32-bit provider on a 64-bit SQL Server 2025 instance, enable the “Allow inprocess” setting via sp_MSset_oledb_prop or switch to a 64-bit equivalent provider.

Step 2: Increase System and Process Virtual Memory

  • Navigate to Control Panel > System > Advanced System Settings > Performance Settings > Advanced > Virtual Memory.
  • Set the paging file size manually (e.g., Initial: 4096 MB, Maximum: 16384 MB) rather than relying on “System Managed Size.”
  • Restart the server and re-run the query or SSIS package that triggered Error 10003.

Step 3: Repair or Reinstall the OLE DB Provider

  • Open Programs and Features in Windows 11/Server 2025 and locate the provider package (e.g., “Microsoft OLE DB Driver for SQL Server”).
  • Right-click and select Repair; if unavailable, uninstall and download the latest version from the official Microsoft Download Center.
  • Restart the SQL Server service via services.msc or run: net stop MSSQLSERVER && net start MSSQLSERVER.

Step 4: Adjust SQL Server Memory Configuration

  • Open SSMS, right-click the server instance, and go to Properties > Memory.
  • Ensure “Maximum server memory” is not set too high, leaving insufficient RAM for OS and provider processes (recommended: leave at least 4GB free for the OS).
  • Apply changes and restart the SQL Server service for the new memory limits to take effect.

Step 5: Check for Corrupted Registry Entries or DLL Conflicts

  • Use regedit to navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\Providers and verify the provider’s AllowInProcess and DynamicParameters DWORD values are set to 1.
  • Run sfc /scannow in an elevated Command Prompt to repair any corrupted system files that may affect provider DLLs.

Alternative or Verification Steps

  • To verify the fix, re-execute the failing linked server query or SSIS package and monitor the SQL Server Error Log (via SSMS or xp_readerrorlog) for the absence of Error 10003.
  • If the issue persists, consider migrating the data operation to use a native SQL Server connection (via OPENROWSET with SQLNCLI11) instead of the third-party OLE DB provider to bypass memory allocation limits entirely.

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

Troubleshooting Guide: Error 10001 — “The Provider Reported an Unexpected Catastrophic Failure”

Why This Error Happens

This error typically occurs when the OLE DB provider (such as MSOLEDBSQL or SQLNCLI) encounters a corrupted connection state, often due to mismatched driver versions between SQL Server 2025 and the client provider installed on Windows Server 2025 / Windows 11. It can also be triggered by insufficient permissions on linked server configurations, corrupted DLL registrations in the Windows registry, or network-level packet corruption affecting the TDS (Tabular Data Stream) protocol. In distributed query scenarios, this is frequently tied to a failed or improperly configured linked server attempting to use a deprecated or unregistered provider.

Step-by-Step Resolution Guide

Step 1: Verify and Update the OLE DB Provider

  • Confirm the installed version of MSOLEDBSQL by checking Control Panel > Programs and Features.
  • Download and install the latest Microsoft OLE DB Driver for SQL Server from the official Microsoft Download Center.
  • Restart the SQL Server service after installation via services.msc or by running:
    net stop MSSQLSERVER && net start MSSQLSERVER

Step 2: Check Linked Server Configuration

  • Open SSMS and navigate to Server Objects > Linked Servers > [Your Linked Server] > Properties.
  • Verify the “Provider” dropdown is set to a currently supported value (e.g., MSOLEDBSQL instead of legacy SQLNCLI11).
  • Run the following T-SQL to test connectivity directly:
    EXEC sp_testlinkedserver 'YourLinkedServerName';
  • Ensure “Allow inprocess” is enabled under Provider Options if using a 64-bit provider.

Step 3: Repair Registry and DLL Registration

  • Open an elevated Command Prompt and re-register the OLE DB DLL:
    regsvr32 "C:\Program Files\Microsoft OLE DB Driver for SQL Server\binn\msoledbsql.dll"
  • Check the registry path HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSOLEDBSQL to confirm the provider is correctly listed and not flagged as disabled.
  • If corruption is suspected, uninstall the provider completely via Settings > Apps, delete leftover folders in C:\Program Files\Microsoft OLE DB Driver for SQL Server\, and reinstall fresh.

Step 4: Validate Network and Firewall Settings

  • Confirm SQL Server is listening on the correct port (default 1433) using SQL Server Configuration Manager > SQL Server Network Configuration > Protocols.
  • Check Windows Defender Firewall on Windows Server 2025 to ensure inbound rules allow traffic on the SQL Server port.
  • Test raw connectivity using:
    Test-NetConnection -ComputerName YourServerName -Port 1433

Alternative or Verification Steps

  • To verify the fix, run a simple distributed query (e.g., SELECT * FROM OPENQUERY(LinkedServerName, 'SELECT 1')) and confirm it returns results without throwing Error 10001.
  • If the issue persists, as a fallback, switch the linked server provider to the native SQL Server driver (SQLNCLI replacement) or use a DSN-based ODBC connection instead of OLE DB to bypass potential provider-specific bugs.

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

Troubleshooting Guide: SQL Server Error 9999 — Sparse Column Set Full-Text Indexing Failure

Why This Error Happens

This error occurs because SQL Server 2025 does not permit full-text indexes to be created or maintained on a computed column that represents a sparse column set (i.e., a column defined with COLUMN_SET FOR ALL_SPARSE_COLUMNS). Since a sparse column set is a dynamically generated XML representation of underlying sparse columns rather than a static data column, the Full-Text Engine cannot tokenize or index its contents reliably. This typically surfaces when a DBA attempts to add a full-text index to a table and mistakenly selects the column set alongside standard columns, or when a maintenance script iterates through all columns in a table without filtering out system-generated sparse sets.

Step-by-Step Resolution Guide

Step 1: Identify the Offending Column Set

  • Run the following query to confirm which column in the table is configured as a sparse column set:
  SELECT name, is_column_set 
  FROM sys.columns 
  WHERE object_id = OBJECT_ID('YourTableName') AND is_column_set = 1;
  • Note the exact column name returned (e.g., SparseColumnSet) as reported in the Error 9999 message.

Step 2: Remove the Column Set from the Full-Text Index Definition

  • Open SQL Server Management Studio (SSMS) and navigate to Database > Tables > YourTable > Full-Text Indexes.
  • If using T-SQL, drop and recreate the index excluding the sparse set:
  DROP FULLTEXT INDEX ON YourTableName;

  CREATE FULLTEXT INDEX ON YourTableName
  (RegularColumn1, RegularColumn2) -- Exclude the Sparse Column Set here
  KEY INDEX PK_YourTableName
  ON YourFullTextCatalog;

Step 3: Index the Underlying Sparse Columns Individually (If Needed)

  • If the data within the sparse columns must be searchable, do not use the Column Set wrapper. Instead, add the individual underlying sparse columns (e.g., varchar(max) SPARSE) directly to the CREATE FULLTEXT INDEX statement.
  • Verify the specific sparse columns support full-text data types (character-based large object types) before adding them.

Step 4: Restart the Full-Text Filter Daemon Service

  • Open Services.msc on Windows Server 2025.
  • Locate SQL Full-text Filter Daemon Launcher (MSSQLSERVER).
  • Right-click and select Restart to clear any cached schema locks related to the failed index attempt.

Alternative or Verification Steps

  • Verification: Query sys.fulltext_index_columns joined with sys.columns to ensure the column_id of the sparse set is absent from the full-text index metadata.
  • Alternative: If the business requirement strictly needs to search “all columns” dynamically, consider creating an indexed view that explicitly CASTs the sparse columns into standard concatenated nvarchar fields, then apply the full-text index to that view instead of the base table.

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

Troubleshooting Guide: SQL Server Error 10000 — “Unknown Provider Error”

Why This Error Happens

This error typically occurs when SQL Server 2025 cannot establish a connection through the specified network provider due to a misconfigured or disabled network protocol (such as TCP/IP or Named Pipes) in SQL Server Configuration Manager. It can also result from a corrupted client-side connectivity component (OLE DB/ODBC driver) or a firewall/port conflict blocking communication on Windows Server 2025 or Windows 11. In some cases, stale or incorrect connection strings referencing an outdated provider name contribute to this failure.

Step-by-Step Resolution Guide

Step 1: Verify SQL Server Network Protocols

  • Open SQL Server Configuration Manager on the host machine.
  • Navigate to SQL Server Network Configuration > Protocols for MSSQLSERVER.
  • Ensure TCP/IP and Named Pipes are set to Enabled.
  • Restart the SQL Server service after making changes: net stop MSSQLSERVER && net start MSSQLSERVER.

Step 2: Check Firewall and Port Configuration

  • Confirm SQL Server is listening on port 1433 (default) via netstat -ano | findstr 1433.
  • On Windows Server 2025/Windows 11, open Windows Defender Firewall with Advanced Security.
  • Create or verify an inbound rule allowing TCP traffic on port 1433 and the SQL Browser service on UDP 1434.
  • Disable any third-party firewall temporarily to rule out blocking.

Step 3: Reinstall or Repair Client Connectivity Components

  • Open Control Panel > Programs and Features.
  • Locate Microsoft OLE DB Driver for SQL Server or ODBC Driver 18 for SQL Server.
  • Select Repair, or uninstall and reinstall the latest driver from the official Microsoft Download Center.
  • Validate the connection string provider name matches the installed driver (e.g., MSOLEDBSQL19 or ODBC Driver 18 for SQL Server).

Step 4: Validate SQL Server Alias and Client Configuration

  • In SQL Server Configuration Manager, go to SQL Native Client Configuration > Aliases.
  • Remove any outdated or duplicate aliases pointing to the old provider.
  • Recreate the alias with the correct protocol (TCP/IP) and port number.

Step 5: Review SQL Server Error Logs

  • Open SQL Server Management Studio (SSMS) and navigate to Management > SQL Server Logs.
  • Search for Event ID 10000 entries to confirm the exact provider referenced in the failure.
  • Cross-reference the provider name with installed drivers to identify mismatches.

Alternative or Verification Steps

  • Test connectivity using sqlcmd -S <ServerName> -U <Username> -P <Password> from the command line to confirm the fix resolved the provider error.
  • If the issue persists, try connecting via the SQL Server Native Client 11.0 as a fallback provider, or recreate the ODBC Data Source Name (DSN) entirely using ODBC Data Sources (64-bit) in Windows Administrative Tools.

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

Why This Error Happens

Error 9996 typically occurs when SQL Server’s internal mechanism attempts to create a system-managed AFTER trigger to track DML changes against a table’s Doc Id (commonly tied to Change Tracking or Full-Text indexing metadata) but lacks the necessary permissions or encounters schema-level conflicts. This is frequently caused by the SQL Server service account missing ALTER or CONTROL permissions on the target table, a pre-existing user-defined trigger occupying the same internal namespace, or corrupted system metadata in the sys.triggers catalog. In some cases, this also surfaces when Change Tracking is enabled on a table that has reached the maximum trigger limit (objects per table) allowed by SQL Server 2025.

Step-by-Step Resolution Guide

Step 1: Verify Service Account Permissions

  • Open SQL Server Configuration Manager and confirm the service account running the SQL Server 2025 instance.
  • Ensure this account has db_ddladmin or sysadmin role membership on the affected database.
  • Run the following to check current permissions:
  SELECT * FROM fn_my_permissions('dbo.YourTableName', 'OBJECT');

Step 2: Check for Trigger Namespace Conflicts

  • Query existing triggers on the table to look for naming collisions:
  SELECT name, is_disabled FROM sys.triggers WHERE parent_id = OBJECT_ID('dbo.YourTableName');
  • If a conflicting trigger exists (often named similarly to trg_CT_ or trg_DML_), drop or rename it:
  DROP TRIGGER [dbo].[ConflictingTriggerName];

Step 3: Disable and Re-enable Change Tracking

  • Disable Change Tracking on the table to clear corrupted internal trigger bindings:
  ALTER TABLE dbo.YourTableName DISABLE CHANGE_TRACKING;
  • Re-enable it to force SQL Server to regenerate the AFTER trigger cleanly:
  ALTER TABLE dbo.YourTableName ENABLE CHANGE_TRACKING;

Step 4: Repair System Metadata Corruption

  • Run DBCC CHECKDB against the database to rule out catalog corruption:
  DBCC CHECKDB ('YourDatabaseName') WITH NO_INFOMSGS, ALL_ERRORMSGS;
  • If corruption is found in system tables, restore from the last known good backup rather than attempting a repair with data loss.

Step 5: Validate Object Limits

  • Confirm the table has not exceeded SQL Server 2025’s per-table trigger limit (relevant in high-volume tracking scenarios).
  • Consolidate custom triggers where possible to free up slots for the internal DML tracking trigger.

Alternative or Verification Steps

  • After applying fixes, perform a test DML operation (INSERT/UPDATE/DELETE) on the table and confirm the Doc Id is logged correctly in the CHANGETABLE() output or your tracking audit table.
  • If the error persists, as a workaround, manually create an equivalent user-defined AFTER trigger to log DML operations into a staging table, then escalate to Microsoft Support with the DBCC CHECKDB output for deeper catalog analysis.

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

Troubleshooting Guide: SQL Server Error 9998 – Full-Text Index Column Limit Exceeded

Why This Error Happens

This error occurs because SQL Server 2025 enforces a hard architectural limit of 1024 columns per full-text index, and the current table or indexing operation attempts to exceed that threshold. It typically arises when a table has grown wide over time through multiple schema changes, or when a full-text index definition was scripted to include too many columns in a single CREATE FULLTEXT INDEX or ALTER FULLTEXT INDEX ADD statement. The engine rejects the additional column before indexing metadata becomes corrupted, so the underlying full-text catalog remains stable but incomplete.

Step-by-Step Resolution Guide

Step 1: Audit the Current Full-Text Index Column Count

  • Run the following query to check how many columns are currently indexed on the target table:
  • SELECT COUNT(*) FROM sys.fulltext_index_columns WHERE object_id = OBJECT_ID('YourSchema.YourTable');
  • Cross-reference this count against the 1024-column ceiling to confirm you are at or near the limit.
  • Identify which column triggered the error by checking the %.*ls placeholder value in the SQL Server error log (located at C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Log\ERRORLOG on Windows Server 2025/Windows 11 default installs).

Step 2: Remove Low-Priority or Redundant Columns from the Index

  • Use ALTER FULLTEXT INDEX ON YourSchema.YourTable DROP (ColumnName); to remove columns that are rarely searched or duplicated in other indexed fields.
  • Prioritize keeping only columns actively used in CONTAINS or FREETEXT predicates.
  • Consider consolidating near-duplicate text columns (e.g., Description and Description_Legacy) into a single computed column before indexing.

Step 3: Split the Table or Use a Filtered View

  • If all 1024 columns are genuinely required, redesign the schema by splitting the wide table into two or more narrower tables linked by a foreign key.
  • Create separate full-text indexes on each resulting table, staying under the per-index limit.
  • Alternatively, build an indexed view that aggregates only the essential searchable columns, then apply the full-text index to that view instead of the base table.

Step 4: Rebuild and Validate the Full-Text Catalog

  • After adjusting the column set, run ALTER FULLTEXT INDEX ON YourSchema.YourTable START FULL POPULATION; to rebuild the catalog cleanly.
  • Monitor progress via sys.dm_fts_index_population to ensure the population completes without further errors.

Alternative or Verification Steps

  • Verify the fix by re-running SELECT COUNT(*) FROM sys.fulltext_index_columns WHERE object_id = OBJECT_ID('YourSchema.YourTable'); and confirming the result stays below 1024.
  • If schema redesign isn’t feasible immediately, use sys.dm_fts_parser to test whether a smaller, curated column subset still returns acceptable search relevance before committing to a permanent structural change.

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

Troubleshooting Guide: Error 9995 – Fulltext Failed DocId Internal Table Access Error

Why This Error Happens

Error 9995 occurs when SQL Server’s Full-Text Search engine cannot access the internal DocId mapping table associated with a full-text catalog, typically due to corruption in the full-text catalog files or underlying filesystem. This can also result from insufficient permissions on the SQL Server service account to read/write to the full-text index directory, or from an abrupt shutdown/crash that left the internal full-text metadata in an inconsistent state. In some cases, antivirus or backup software locking files in the full-text data directory can trigger this HRESULT failure.

Step-by-Step Resolution Guide

Step 1: Verify Service Account Permissions

  • Open Services.msc on Windows Server 2025 / Windows 11 and confirm the account running “SQL Server (MSSQLSERVER)” has Full Control on the database data directory (typically C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\DATA).
  • Right-click the folder, go to Properties > Security, and ensure the SQL Server service SID (e.g., NT SERVICE\MSSQLSERVER) has Read/Write/Modify permissions.
  • Restart the SQL Server service after applying changes to ensure the new permissions take effect.

Step 2: Rebuild the Full-Text Catalog

  • Open SQL Server Management Studio (SSMS) and connect to the affected instance.
  • Run the following T-SQL command to force a rebuild of the corrupted catalog:
  ALTER FULLTEXT CATALOG [YourCatalogName] REBUILD;
  • If the catalog name is unknown, retrieve it first using SELECT * FROM sys.fulltext_catalogs;.
  • Monitor the SQL Server Error Log for confirmation that the rebuild completed without further HRESULT errors.

Step 3: Check for File-Level Locks or Antivirus Interference

  • Exclude the SQL Server data directory and the FTDATA subfolder from real-time antivirus scanning, as locked files commonly cause DocId table access failures.
  • Use Process Explorer (Sysinternals) to confirm no external process (like a backup agent) is holding a handle on the .fts or catalog files during the error window.
  • Add the exclusion path in Windows Security > Virus & threat protection > Exclusions if using Windows Defender.

Step 4: Run Database Consistency Checks

  • Execute DBCC CHECKDB('YourDatabaseName') WITH NO_INFOMSGS, ALL_ERRORMSGS; to rule out underlying page-level corruption affecting the full-text index tables.
  • Review the output for any allocation errors related to system tables that support full-text indexing.
  • If corruption is confirmed, restore the database from the last known good backup before attempting to rebuild the full-text catalog again.

Alternative or Verification Steps

  • To verify the fix, run a test query against the full-text index (e.g., SELECT * FROM YourTable WHERE CONTAINS(YourColumn, 'test')) and confirm it executes without throwing Error 9995.
  • If the error persists after a rebuild, drop the full-text index entirely using DROP FULLTEXT INDEX ON YourTable, delete the orphaned catalog folder from the file system, and recreate the index and catalog from scratch.

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

Troubleshooting Guide: SQL Server Error 9993 – Fulltext Index Internal Table Creation Failure

Why This Error Happens

Error 9993 occurs when SQL Server’s Full-Text Search engine cannot create the internal tracking table used to log document IDs (DocIds) that fail during a full-text population or crawl. This is typically caused by insufficient permissions on the database for the Full-Text Search service account, insufficient disk space in the filegroup hosting the full-text catalog, or an underlying corruption in the full-text catalog metadata. In some cases, this informational message surfaces alongside filegroup read-only states or schema lock conflicts that prevent internal system table creation.

Step-by-Step Resolution Guide

Step 1: Verify Database and Filegroup Permissions

  • Confirm the SQL Server service account (and the Full-Text Search service, MSSQLFDLauncher) has db_owner or sufficient schema-modification rights on the target database.
  • Run the following to check current permissions:
EXEC sp_helprotect NULL, NULL, NULL, 'MSSQLFDLauncher';
  • Ensure the database is not set to read-only by checking: SELECT name, is_read_only FROM sys.databases WHERE name = 'YourDBName';

Step 2: Check Disk Space and Filegroup Health

  • Navigate to the data file location (commonly C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\DATA\) and confirm adequate free disk space (at least 20% free is recommended).
  • Run DBCC CHECKFILEGROUP against the filegroup hosting the full-text indexed table to rule out corruption.
  • If space is low, expand the data file or move the full-text catalog to a filegroup with more available storage using ALTER FULLTEXT INDEX.

Step 3: Rebuild the Full-Text Catalog

  • Drop and recreate the full-text index on the affected table to force regeneration of internal tracking tables.
DROP FULLTEXT INDEX ON dbo.YourTableName;
GO
CREATE FULLTEXT INDEX ON dbo.YourTableName(ColumnName)
KEY INDEX PK_YourTableName
ON YourFullTextCatalog
WITH CHANGE_TRACKING AUTO;
GO
  • Restart the SQL Server Full-Text Filter Daemon Launcher service via services.msc or:
Restart-Service MSSQLFDLauncher

Step 4: Review SQL Server Error Log and Event Viewer

  • Open the SQL Server Error Log (via SSMS: Management > SQL Server Logs) and cross-reference Error 9993 with surrounding messages for additional context (e.g., Error 9002 log full, or Error 5120 OS-level file access issues).
  • Check Windows Event Viewer under Applications and Services Logs > MSSQLSERVER on Windows Server 2025/Windows 11 for corresponding I/O or permission-denied entries.

Alternative or Verification Steps

  • Verify the fix by manually initiating a full population: ALTER FULLTEXT INDEX ON dbo.YourTableName START FULL POPULATION; and confirm no Error 9993 reappears in the log during the crawl.
  • If the issue persists, run DBCC CHECKDB on the full database to rule out broader corruption, then consider dropping and recreating the entire full-text catalog (not just the index) using DROP FULLTEXT CATALOG followed by CREATE FULLTEXT CATALOG.

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

Troubleshooting Guide: SQL Server Error 9994 – Full-Text Indexing Document Insertion Failure

Why This Error Happens

Error 9994 occurs when SQL Server’s Full-Text Engine (specifically the Filter Daemon process, MSSQLFDLauncher) fails to insert a document’s metadata into the internal full-text catalog tables during population or crawl operations. This is typically caused by corrupted full-text index fragments, insufficient permissions on the Full-Text Daemon service account, or a mismatched/missing IFilter needed to parse the specific document type referenced by the Doc Id. It can also surface when the internal full-text catalog storage has exceeded disk quotas or encountered I/O contention on the associated filegroup.

Step-by-Step Resolution Guide

Step 1: Verify Full-Text Daemon Service Account Permissions

  • Open Services.msc on Windows Server 2025 and locate SQL Full-Text Filter Daemon Launcher (MSSQLFDLauncher).
  • Ensure the service account has Read permissions on the database files directory (typically C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\DATA).
  • Confirm the account is a member of the SQLServerFDHostUser$$ local group.
  • Restart the service after any permission changes: net stop MSSQLFDLauncher && net start MSSQLFDLauncher

Step 2: Rebuild the Corrupted Full-Text Catalog

  • Open SQL Server Management Studio (SSMS) and connect to the affected instance.
  • Run the following T-SQL to identify the problematic catalog:
SELECT * FROM sys.fulltext_catalogs;
  • Rebuild the catalog to clear corrupted internal structures:
ALTER FULLTEXT CATALOG [YourCatalogName] REBUILD;
  • Re-run a full population to ensure clean indexing:
ALTER FULLTEXT INDEX ON [dbo].[YourTable] START FULL POPULATION;

Step 3: Validate IFilter Registration for Problem Document Types

  • Run EXEC sp_fulltext_service 'load_os_resources', 1; to ensure SQL Server uses OS-level IFilters where available.
  • Check registered filters with:
SELECT * FROM sys.fulltext_document_types;
  • If the Doc Id referenced in the error corresponds to an unsupported or corrupted file type (e.g., a malformed PDF or DOCX), remove or re-import that specific document source.

Step 4: Check Disk Space and Filegroup Health

  • Verify free space on the volume hosting the full-text catalog and database filegroups.
  • Run DBCC CHECKDB on the affected database to rule out underlying page corruption:
DBCC CHECKDB ('YourDatabaseName') WITH NO_INFOMSGS, ALL_ERRORMSGS;

Alternative or Verification Steps

  • After rebuilding, monitor the SQL Server Error Log and Windows Event Viewer (Application log, source MSSQLFDLauncher) for recurrence of Event ID 9994 during the next scheduled population.
  • If the error persists only for specific documents, isolate and exclude those Doc Ids from indexing using a filtered full-text index predicate, then re-run ALTER FULLTEXT INDEX ... START INCREMENTAL POPULATION; to confirm the rest of the table indexes cleanly.

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

Troubleshooting Guide: SQL Server Error 9992 – Full-Text Drop Batch Size Configuration Failure

Why This Error Happens

This error occurs when the SQL Server Full-Text Engine (MSFTESQL/FDHost process) is unable to read the registry or internal configuration value that defines the drop batch size for full-text indexing operations. This is typically caused by corrupted registry keys under the SQL Server instance hive, insufficient permissions for the SQL Server service account to access the configuration path, or incomplete/corrupted installation of the Full-Text Search component. In most cases, SQL Server will gracefully fall back to a default batch size, but the underlying configuration access issue should still be resolved to prevent cascading performance problems during index population.

Step-by-Step Resolution Guide

Step 1: Verify Full-Text Search Service Status

  • Open SQL Server Configuration Manager on Windows Server 2025 / Windows 11.
  • Navigate to SQL Server Services and confirm that SQL Full-text Filter Daemon Launcher is running for your instance.
  • If stopped, right-click and select Start, then set Startup Type to Automatic.

Step 2: Check Registry Permissions for the SQL Service Account

  • Open regedit and navigate to:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL17.<InstanceName>\MSSearch
  • Right-click the key, select Permissions, and ensure the SQL Server service account (e.g., NT Service\MSSQLSERVER or your custom domain account) has Read and Query Value access.
  • Apply changes and restart the SQL Server service for them to take effect.

Step 3: Manually Set the Full-Text Drop Batch Size

  • Open SQL Server Management Studio (SSMS) and connect to the instance.
  • Run the following T-SQL command to explicitly configure the drop batch size at the instance level:
  EXEC sp_fulltext_service 'resource_usage', 3;
  • Restart the SQL Server and SQL Full-text Filter Daemon Launcher services via services.msc or Configuration Manager.

Step 4: Repair the Full-Text Search Component

  • Launch the SQL Server 2025 Setup wizard from the installation media or downloaded ISO.
  • Select Repair and choose the instance showing the error.
  • Allow the wizard to re-register Full-Text Search binaries and reset default configuration values.

Step 5: Review SQL Server Error Logs

  • Navigate to C:\Program Files\Microsoft SQL Server\MSSQL17.<InstanceName>\MSSQL\Log\ERRORLOG
  • Search for Event ID 9992 entries to confirm whether the fallback value is now stable across service restarts.

Alternative or Verification Steps

  • Run SELECT fulltextserviceproperty('ResourceUsage'); in SSMS to confirm the drop batch size value is correctly applied and no longer defaulting unexpectedly.
  • If the error persists after a repair, completely uninstall and reinstall the Full-Text and Semantic Extractions for Search feature via Add or Remove Programs > Microsoft SQL Server 2025 Setup, then re-run sp_fulltext_service to reconfigure settings from scratch.

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

Troubleshooting Guide: SQL Server Error 9990 — Failed to Retrieve Full-Text Batch Size Configuration

Why This Error Happens

This error occurs when the SQL Server Full-Text Filter Daemon Host (MSSQLFDLauncher) service cannot read the configured batch size value from the registry or internal metadata tables due to insufficient permissions on the registry key. It can also happen if the registry hive for SQL Server’s full-text search configuration has become corrupted or was not properly initialized during setup/upgrade. In most cases, SQL Server gracefully falls back to a default batch size, but the underlying misconfiguration should still be corrected to prevent related indexing performance issues.

Step-by-Step Resolution Guide

Step 1: Verify Full-Text Service Account Permissions

  • Open Services.msc and confirm the account running “SQL Server Full-text Filter Daemon Launcher” (MSSQLFDLauncher).
  • Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSearch in Registry Editor.
  • Right-click the key, select Permissions, and ensure the service account has Read and Query Value access.
  • Restart the MSSQLFDLauncher service after applying changes.

Step 2: Rebuild the Full-Text Configuration Registry Keys

  • Stop the SQL Server and Full-Text services via net stop MSSQLFDLauncher and net stop MSSQLSERVER.
  • Export the current MSSearch registry key as backup using reg export.
  • Delete the corrupted BatchSize value (if present) under ...\MSSearch\CLSID.
  • Restart SQL Server services to allow SQL Server to regenerate default configuration values.

Step 3: Manually Set the Full-Text Batch Size Parameter

  • Open SQL Server Management Studio (SSMS) and connect via a sysadmin account.
  • Run the following T-SQL command to explicitly define the batch size:
  EXEC sp_configure 'fulltext batch size', 500;
  RECONFIGURE WITH OVERRIDE;
  • Restart the SQL Server and Full-Text Filter Daemon Launcher services for the change to take effect.

Step 4: Repair the SQL Server Full-Text Component

  • Launch SQL Server Installation Center from the Windows 11/Server 2025 Start menu.
  • Select Maintenance > Repair, choose the affected instance, and let the wizard rebuild the Full-Text Search feature.
  • Reboot the server once the repair process completes.

Alternative or Verification Steps

  • Check the SQL Server Error Log (via SSMS or ERRORLOG file in MSSQL17.MSSQLSERVER\MSSQL\Log) to confirm Error 9990 no longer appears on service restart.
  • If the issue persists, run DBCC FREEPROCCACHE and rebuild the full-text catalog using ALTER FULLTEXT CATALOG [CatalogName] REBUILD; to rule out catalog-level corruption.

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

Troubleshooting Guide: SQL Server Error 9991 – Failed to Retrieve Max Full-Text Crawl Range Configuration

Why This Error Happens

This error occurs when the SQL Server Full-Text Filter Daemon Host (MSSQLFDLauncher) service cannot read the max_full_text_crawl_range configuration value from the internal registry or configuration store during startup. This is typically caused by corrupted registry hive entries related to SQL Server 2025’s Full-Text Search component, insufficient permissions on the SQL Server service account to access HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server, or a mismatch between the number of CPU cores detected and the cached configuration value. Because SQL Server cannot determine the correct value, it silently falls back to a default crawl range, which can degrade full-text indexing performance on multi-core systems.

Step-by-Step Resolution Guide

Step 1: Verify Service Account Permissions

  • Open Services.msc and confirm which account runs “SQL Full-text Filter Daemon Launcher (MSSQLSERVER)”.
  • Ensure this account has Read access to HKLM\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQLServer\FullText.
  • Use regedit.exe → right-click the key → Permissions → add the service account with Read/Query Value rights if missing.

Step 2: Rebuild the Full-Text Configuration Registry Key

  • Stop the SQL Server and Full-Text services via PowerShell:
  • Stop-Service MSSQLFDLauncher, MSSQLSERVER -Force
  • Export the current key as backup: reg export "HKLM\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQLServer\FullText" C:\Backup\FT_Backup.reg
  • Delete the corrupted FullText subkey and restart the SQL Server service to force regeneration of default values.

Step 3: Manually Set the Max Crawl Range Value

  • Reopen the regenerated FullText key in the registry.
  • Create or edit the DWORD value MaxFullTextCrawlRange and set it based on your CPU core count (e.g., 4 for a 4-core/8-thread server).
  • Save changes and restart MSSQLFDLauncher and MSSQLSERVER services.

Step 4: Apply Latest Cumulative Update

  • Check Windows Update or the SQL Server Setup Bootstrapper for pending CU (Cumulative Update) packages for SQL Server 2025.
  • Install any update addressing “Full-Text Search configuration retrieval” bugs, as this is a known issue in early RTM builds on Windows Server 2025.
  • Reboot the server after installation to ensure the Filter Daemon Host reloads correctly.

Alternative or Verification Steps

  • Run SELECT fulltext_catalog_id, name FROM sys.fulltext_catalogs; in SSMS and check the SQL Server Error Log for the absence of Error 9991 after a service restart.
  • If the error persists, use sp_fulltext_service 'load_os_resources', 1; to force SQL Server to re-read OS-level resource configurations instead of relying on the cached registry value.

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

Troubleshooting Guide: Error 9989 — Cannot Use Full-Text Search in SQL Server 2025

Why This Error Happens

Error 9989 typically occurs because the SQL Server Full-Text Filter Daemon Launcher (MSSQLFDLauncher) service is either disabled, stopped, or not properly associated with the target instance. This can also result from corrupted full-text component registrations during an upgrade to SQL Server 2025, or from the service account lacking sufficient permissions to initialize the filter daemon host process. In some cases, a mismatch between the installed language resources and the full-text engine binaries can trigger this error as well.

Step-by-Step Resolution Guide

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

  • Open SQL Server Configuration Manager (search for it on Windows Server 2025 / Windows 11).
  • Navigate to SQL Server Services and locate SQL Full-text Filter Daemon Launcher (MSSQLSERVER) or your named instance.
  • Right-click and select Start if the service is stopped; set Startup Mode to Automatic.
  • Confirm the service account (typically NT Service\MSSQLFDLauncher$<InstanceName>) is correctly assigned and not using a disabled or expired credential.

Step 2: Rebuild the Full-Text Component via SQL Server Setup

  • Launch the SQL Server 2025 Installation Center from the installation media or Control Panel.
  • Select Maintenance > Repair, then choose the affected instance.
  • During the repair wizard, ensure the Full-Text and Semantic Extractions for Search feature checkbox remains selected.
  • Complete the repair and restart the SQL Server (MSSQLSERVER) service afterward via services.msc.

Step 3: Enable Full-Text Search at the Instance and Database Level

  • Open SQL Server Management Studio (SSMS) and connect to the instance.
  • Run the following query to confirm full-text is installed:
SELECT SERVERPROPERTY('IsFullTextInstalled');
  • If it returns 0, the feature is not installed — repeat Step 2.
  • If it returns 1, enable it on your target database:
EXEC sp_fulltext_database 'enable';

Step 4: Check Permissions and Firewall/Local Security Policy Restrictions

  • Confirm the MSSQLFDLauncher service account has Log on as a service rights via secpol.msc under Local Policies > User Rights Assignment.
  • Ensure no Group Policy on Windows Server 2025 blocks the service’s local system calls.
  • Restart both SQL Server and SQL Full-text Filter Daemon Launcher services after making changes.

Alternative or Verification Steps

  • Run SELECT fulltextserviceproperty('IsFullTextInstalled'); in SSMS — a return value of 1 confirms the fix was successful.
  • If the issue persists, drop and recreate the full-text catalog using CREATE FULLTEXT CATALOG after confirming the database is in a healthy, non-restoring state.

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

Troubleshooting Guide: SQL Server Error 9987 – Invalid NEAR Clause Max Gap Argument

Why This Error Happens

This error occurs when a Full-Text Search query uses the NEAR clause with a MAX_GAP or MAX parameter that does not conform to the expected syntax, typically caused by passing a non-integer value, a negative number, or a malformed string instead of a valid integer or the literal keyword MAX. This is almost always a query-authoring issue rather than a server configuration problem, often introduced by dynamically generated SQL, ORM-translated queries, or copy-pasted T-SQL with incorrect syntax. In rare cases, it can also surface after upgrading to SQL Server 2025 if legacy Full-Text Search queries relied on deprecated or non-standard NEAR syntax that is now strictly validated.

Step-by-Step Resolution Guide

Step 1: Identify the Offending Query

  • Capture the exact T-SQL statement that triggered Error 9987 using SQL Server Profiler, Extended Events, or the application log that reported the failure.
  • Look specifically for CONTAINS or CONTAINSTABLE predicates that use the NEAR keyword, for example:
    CONTAINS(column, 'NEAR((word1, word2), 5)')
  • Check if the second argument (the max gap value) is a variable, string, or user-input value rather than a hardcoded integer.

Step 2: Correct the NEAR Clause Syntax

  • Ensure the max gap argument is either a non-negative integer (e.g., 0, 5, 10) or the literal keyword MAX (case-insensitive), with no quotes around it.
  • Valid example: CONTAINS(column, 'NEAR((word1, word2), MAX)')
  • Valid example: CONTAINS(column, 'NEAR((word1, word2), 10)')
  • Invalid example to fix: CONTAINS(column, 'NEAR((word1, word2), "10")') — remove the quotes around the numeric value.
  • If the value is passed via a parameter or variable, add validation logic in the application layer to ensure only integers ≥ 0 or the string MAX are passed through.

Step 3: Update Application or ORM Query Generation Logic

  • If the query is generated dynamically (e.g., via Entity Framework, Hibernate, or a custom data access layer), inspect the code responsible for building the CONTAINS predicate string.
  • Add input sanitization to cast or validate the max gap value as an integer before concatenation:
    int maxGap = Math.Max(0, userInputValue);
  • Redeploy the updated application build or stored procedure to Windows Server 2025 / Windows 11 and restart the SQL Server service if the fix involves a compiled stored procedure:
    Restart-Service -Name 'MSSQLSERVER'

Step 4: Rebuild or Validate the Full-Text Index (If Needed)

  • If the error persists despite correct syntax, verify the Full-Text Catalog is not corrupted by running:
    ALTER FULLTEXT INDEX ON [YourTable] REBUILD;
  • Check the SQL Server error log located at C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Log\ERRORLOG for any related Full-Text Search engine warnings.

Alternative or Verification Steps

  • Re-run the corrected query directly in SQL Server Management Studio (SSMS) connected to your SQL Server 2025 instance and confirm it executes without raising Error 9987.
  • As an alternative, temporarily replace the NEAR clause with a simpler CONTAINS predicate (without proximity search) to confirm the base query logic works, then reintroduce NEAR incrementally to isolate the exact malformed argument.

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

Troubleshooting Guide: SQL Server Error 9988 – NEAR Clause Term Limit Exceeded

Why This Error Happens

Error 9988 occurs when a Full-Text Search query uses the NEAR proximity operator with more than 64 search terms, which is a hard-coded architectural limit in the SQL Server Full-Text Engine (including SQL Server 2025). This typically happens when queries are dynamically constructed from user input, large keyword lists, or auto-generated search strings without validation on term count. The limit applies cumulatively across all terms inside the parentheses of the NEAR clause, including synonyms or thesaurus expansions that may inflate the term count unexpectedly.

Step-by-Step Resolution Guide

Step 1: Identify the Offending Query

  • Capture the exact T-SQL query that triggered Error 9988 using SQL Server Profiler, Extended Events, or the application-level error log.
  • Count the number of comma-separated or space-separated terms inside the NEAR() function to confirm it exceeds 64.
  • Check if the query is dynamically generated (e.g., from a search box, API, or ETL job) rather than hardcoded.

Step 2: Refactor the NEAR Clause to Reduce Term Count

  • Split the single NEAR clause into multiple smaller NEAR clauses, each with 64 terms or fewer, and combine them using OR or AND logic.
  • Example restructure:
  SELECT * FROM Documents
  WHERE CONTAINS(Body, 'NEAR((term1, term2, ... term64), 10)')
     OR CONTAINS(Body, 'NEAR((term65, term66, ... term100), 10)')
  • If the terms are generated programmatically, add a validation function in the application layer (C#, PowerShell, or T-SQL) to chunk the term list into batches of 64 before building the query string.

Step 3: Audit Thesaurus and Synonym Expansion

  • Navigate to C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\FTData\ (adjust instance path for SQL Server 2025) and review the tsenu.xml (or relevant language) thesaurus file.
  • Check if synonym expansion is silently adding extra terms to your NEAR clause, pushing it over the 64-term limit even though your original query looked compliant.
  • Disable or trim unnecessary thesaurus expansions for the affected language ID if expansion is the root cause.

Step 4: Update Application-Side Query Builders

  • If using Full-Text Search via Entity Framework, Dapper, or a custom query builder, add a hard limit/validation (if (terms.Count > 64) { ChunkQuery(); }) before the query is sent to SQL Server.
  • Deploy the updated application build to your Windows Server 2025 or Windows 11 client/application tier.

Alternative or Verification Steps

  • Run the refactored query directly in SQL Server Management Studio (SSMS) against the affected database and confirm it executes without Error 9988, then validate result accuracy against the original intended search logic.
  • If chunking NEAR clauses is impractical for your use case, consider switching to CONTAINS with AND/OR logic (without NEAR proximity) for very large term sets, as this operator does not impose the same 64-term restriction.

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

Troubleshooting Guide: SQL Server Error 9985 – Insufficient Memory for Search Property List Cache

Why This Error Happens

Error 9985 occurs when SQL Server 2025’s Full-Text Engine cannot allocate enough memory from the buffer pool to build or load the search property list cache during an indexing operation. This is typically caused by memory pressure from other SQL Server processes, an undersized “max server memory” configuration, or a large number of concurrent full-text indexing requests competing for the same resource pool. In some cases, a corrupted or bloated search property list in the sys.registered_search_property_lists catalog can also inflate the memory footprint required to load it.

Step-by-Step Resolution Guide

Step 1: Check and Adjust SQL Server Memory Configuration

  • Open SQL Server Management Studio (SSMS) and connect to the instance.
  • Run EXEC sp_configure 'max server memory (MB)'; to check the current ceiling.
  • If the value is too restrictive relative to available system RAM, increase it:
  EXEC sp_configure 'show advanced options', 1;
  RECONFIGURE;
  EXEC sp_configure 'max server memory (MB)', 16384; -- adjust based on server RAM
  RECONFIGURE;
  • On Windows Server 2025/Windows 11, confirm total physical RAM via Task Manager > Performance tab, and leave at least 20-25% headroom for the OS.

Step 2: Reduce Full-Text Indexing Concurrency

  • Open a query window and check active full-text crawls:
  SELECT * FROM sys.dm_fts_active_catalogs;
  • Pause or stagger full-text population jobs instead of running them simultaneously:
  ALTER FULLTEXT INDEX ON [YourTable] STOP POPULATION;
  • Reschedule large catalog rebuilds during off-peak hours using SQL Server Agent jobs.

Step 3: Rebuild or Clean Up the Search Property List

  • Identify the affected property list:
  SELECT * FROM sys.registered_search_property_lists;
  • If the list is excessively large or suspected corrupted, drop and recreate it:
  DROP SEARCH PROPERTY LIST [YourPropertyListName];
  CREATE SEARCH PROPERTY LIST [YourPropertyListName];
  • Re-associate the new property list with the relevant full-text index via SSMS (Full-Text Index Properties > Property List).

Step 4: Clear SQL Server Internal Caches

  • Flush unused memory caches to relieve pressure before retrying the indexing statement:
  DBCC FREESYSTEMCACHE('ALL');
  DBCC DROPCLEANBUFFERS; -- use only in non-production or maintenance windows
  • Restart the SQL Server Full-Text Filter Daemon Launcher service via services.msc (service name: MSSQLFDLauncher).

Step 5: Validate Windows Server Resource Allocation

  • Open Task Manager or Resource Monitor to confirm no other process (e.g., antivirus, backup agents) is consuming excessive RAM during the indexing window.
  • Check Windows Server 2025 memory compression and paging file settings under System Properties > Advanced > Performance Settings, ensuring the page file isn’t undersized relative to physical RAM.

Alternative or Verification Steps

  • After applying the changes, rerun the original full-text indexing statement and confirm Error 9985 no longer appears in the SQL Server Error Log (EXEC xp_readerrorlog 0, 1, N'9985';).
  • If the error persists, as a workaround, temporarily reduce the number of columns/properties in the search property list or split large full-text catalogs into smaller, separately populated catalogs to lower peak memory demand.

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

Troubleshooting Guide: Error 9986 – Search Property List Cache Generation Failure

Why This Error Happens

Error 9986 occurs when SQL Server’s full-text indexing engine fails to query the registered search properties from the sys.registered_search_property_lists system metadata, typically due to a corrupted Full-Text Catalog or a damaged MSFTESQL/Filter Daemon Host (FDHost) component. This can also stem from insufficient permissions on the SQL Server service account to access property store registry keys, or from corruption in the underlying property cache files stored in the catalog’s physical directory. In some cases, a mismatched or outdated tquery.dll/FTSPersistentStore component after an OS or SQL Server patch update triggers this HRESULT-level internal failure.

Step-by-Step Resolution Guide

Step 1: Restart the Full-Text Filter Daemon Host Service

  • Open Services.msc on Windows Server 2025 / Windows 11.
  • Locate SQL Full-text Filter Daemon Launcher (MSSQLSERVER) and restart it.
  • Alternatively, run in an elevated Command Prompt:
  net stop MSSQLFDLauncher
  net start MSSQLFDLauncher
  • This clears any stale in-memory property list cache causing the HRESULT failure.

Step 2: Rebuild the Full-Text Catalog

  • Open SQL Server Management Studio (SSMS) and connect to the affected instance.
  • Run the following T-SQL against the impacted database:
  ALTER FULLTEXT CATALOG [YourCatalogName] REBUILD;
  • If the catalog name is unknown, retrieve it first:
  SELECT name FROM sys.fulltext_catalogs;
  • Rebuilding forces SQL Server to regenerate the search property list cache from scratch.

Step 3: Verify Registered Search Property Lists Integrity

  • Run the following query to check for corruption or orphaned entries:
  SELECT * FROM sys.registered_search_property_lists;
  • If the list is empty or throws an error, drop and recreate the property list:
  DROP SEARCH PROPERTY LIST [YourPropertyListName];
  CREATE SEARCH PROPERTY LIST [YourPropertyListName];
  • Reassign the new property list to the affected full-text index via ALTER FULLTEXT INDEX.

Step 4: Validate Service Account Permissions

  • Open Component Services (dcomcnfg) and confirm the SQL Server service account has Launch and Activation Permissions for the Filter Daemon Host.
  • Check that the account also has read/write access to:
  C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\FTData
  • Grant Full Control to the SQL Server service account on this folder if missing, then restart the SQL Server and Full-Text Filter Daemon Launcher services.

Step 5: Apply the Latest Cumulative Update

  • Confirm your SQL Server 2025 build number via:
  SELECT @@VERSION;
  • Download and install the latest Cumulative Update (CU) from the Microsoft Update Catalog, as this issue is sometimes tied to a known tquery.dll versioning bug.
  • Reboot Windows Server 2025 / Windows 11 after installation to finalize component registration.

Alternative or Verification Steps

  • After completing the steps above, run ALTER FULLTEXT CATALOG [YourCatalogName] REBUILD; once more and monitor the SQL Server Error Log or Event Viewer (Application log) to confirm Error 9986 no longer appears during the next full population.
  • If the error persists, drop the full-text index entirely, restart the SQL Server instance, and recreate the index and catalog from scratch as a clean-slate alternative.

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

Troubleshooting Guide: SQL Server Error 9983 — Full-Text Component Value Length Exceeded

Why This Error Happens

Error 9983 occurs when a value passed to a full-text search component—such as a catalog name, stoplist name, property name, or a parameter used in CREATE FULLTEXT INDEX, sp_fulltext_* procedures, or sys.sp_help_fulltext_*—exceeds the maximum character length permitted by the SQL Server full-text engine. This is commonly triggered by automated scripts, ORM-generated schema names, or migration tools that dynamically concatenate long identifiers (e.g., combining schema, table, and column names into a catalog or index name). It can also occur after upgrading to SQL Server 2025, where stricter validation on full-text metadata components was introduced compared to legacy versions.

Step-by-Step Resolution Guide

Step 1: Identify the Offending Value and Component

  • Review the full error message text carefully — it specifies both the %ls value and the %ls component name (e.g., catalog name, stoplist, thesaurus file path, or property list name).
  • Run the failing T-SQL statement in SQL Server Management Studio (SSMS) with SET NOCOUNT ON to isolate the exact command.
  • Check Windows Event Viewer under Applications and Services Logs > Microsoft > SQL Server for the full stack trace tied to Event ID 9983.

Step 2: Shorten the Identifier or Value

  • Full-text catalog names, stoplist names, and property list names are limited to 120 characters in SQL Server 2025 — confirm your value against this limit.
  • Rename the object using sp_rename or recreate it with a shortened identifier:
  DROP FULLTEXT CATALOG [YourExcessivelyLongCatalogNameHere];
  CREATE FULLTEXT CATALOG [FTCatalog_Short] AS DEFAULT;
  • If the value originates from an application or migration script (e.g., Entity Framework, SSDT, or a DevOps pipeline), update the naming convention logic to enforce a character cap before deployment.

Step 3: Check Full-Text Configuration Files and Registry Paths

  • If the long value is a file path (e.g., a custom thesaurus or stopword file referenced in sys.fulltext_system_stopwords), move the file to a shorter directory path such as C:\FTData\ instead of a deeply nested folder structure.
  • Update the reference in SQL Server:
  EXEC sp_fulltext_load_thesaurus_file @lcid = 1033;
  • Restart the SQL Server Full-Text Filter Daemon Launcher service via services.msc or:
  Restart-Service -Name "MSSQLFDLauncher"

Step 4: Validate Schema and Script Changes

  • Re-run the original CREATE FULLTEXT INDEX or CREATE FULLTEXT CATALOG statement with the corrected, shortened values.
  • If using SSDT or a deployment pipeline, regenerate the DACPAC/BACPAC after applying the naming fix to avoid reintroducing the long value on next deployment.

Alternative or Verification Steps

  • Confirm the fix by querying sys.fulltext_catalogs and sys.fulltext_stoplists to ensure all name column values are within the 120-character limit and the objects report is_default = 1 where expected.
  • If the error persists after shortening names, rebuild the full-text catalog entirely using ALTER FULLTEXT CATALOG [CatalogName] REBUILD to clear any cached metadata referencing the old oversized value.

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

Troubleshooting Guide: Error 9984 – Full-Text Population Paused

Why This Error Happens

Error 9984 is an informational message indicating that SQL Server 2025 has voluntarily paused a full-text index population (crawl) on a specific table or indexed view. This typically occurs because of resource governor throttling, low disk space on the volume hosting the full-text catalog, or a conflict with another process (such as a backup, index rebuild, or memory pressure event) that is competing for the same I/O or memory resources. It can also happen if the Full-Text Filter Daemon Host service experiences a disruption or is manually paused by an administrator or script.

Step-by-Step Resolution Guide

Step 1: Verify Disk Space and Catalog Health

  • Check the volume hosting your full-text catalog files (default path: C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\FTData) for available free space.
  • Run EXEC sp_help_fulltext_catalogs 'YourCatalogName'; in SQL Server Management Studio (SSMS) to confirm the catalog status is not “Disk Full” or “Corrupt.”
  • Free up space or move the catalog to a volume with more capacity using ALTER FULLTEXT CATALOG YourCatalogName REBUILD; if corruption is suspected.

Step 2: Restart the Full-Text Filter Daemon Host Service

  • Open Services.msc on Windows Server 2025 / Windows 11.
  • Locate SQL Full-text Filter Daemon Launcher (MSSQLSERVER).
  • Right-click and select Restart to clear any stuck filter host processes.
  • Confirm the service status returns to “Running” before proceeding.

Step 3: Check Resource Governor and System Resource Pressure

  • Run SELECT * FROM sys.dm_resource_governor_resource_pools; to ensure the full-text population isn’t being throttled by a custom resource pool.
  • Check Windows Task Manager or Performance Monitor for high CPU/Memory usage on sqlservr.exe or fdhost.exe during the population window.
  • If contention exists, schedule full-text population during off-peak hours using ALTER FULLTEXT INDEX ON YourTable SET CHANGE_TRACKING MANUAL; combined with a maintenance window.

Step 4: Manually Resume the Population

  • Execute the following T-SQL command to force the paused crawl to resume:
  ALTER FULLTEXT INDEX ON YourTable RESUME POPULATION;
  • Monitor the SQL Server Error Log immediately after running this command to confirm the pause does not recur.

Alternative or Verification Steps

  • To verify the fix, query SELECT * FROM sys.fulltext_indexes WHERE object_id = OBJECT_ID('YourTable'); and check that the crawl_type column returns NULL or 0 (indicating no pending crawl) rather than a paused state.
  • If the issue persists, drop and recreate the full-text index entirely using DROP FULLTEXT INDEX ON YourTable; followed by a fresh CREATE FULLTEXT INDEX definition to rule out underlying metadata corruption.

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

Troubleshooting Guide: Error 9982 — Full-Text Search Unavailable in User Instance (SQL Server 2025)

Why This Error Happens

Error 9982 typically occurs because the Full-Text Search component is not installed or enabled for the SQL Server 2025 instance, which is common in lightweight user instances that only provision core database engine features. This can also happen when the SQL Full-Text Filter Daemon Launcher service is stopped, disabled, or running under an account lacking the necessary permissions to access the instance. In some cases, corrupted full-text catalog files or a mismatched instance configuration after an in-place upgrade from a previous SQL Server version can trigger this error as well.

Step-by-Step Resolution Guide

Step 1: Verify Full-Text Search Feature Installation

  • Open SQL Server Installation Center from the Start Menu on Windows Server 2025 / Windows 11.
  • Select Maintenance > Edit Existing Installation and check if “Full-Text and Semantic Extractions for Search” is listed as installed.
  • If missing, choose Add Features to an Existing Instance and select the Full-Text Search component, then complete the installation wizard.

Step 2: Check and Start the Full-Text Filter Daemon Launcher Service

  • Open services.msc and locate SQL Full-text Filter Daemon Launcher (MSSQLSERVER) or the named instance equivalent.
  • Ensure the service Startup Type is set to Automatic and the Status shows Running.
  • If stopped, right-click and select Start; if it fails to start, verify the service account has Log on as a service rights under Local Security Policy > User Rights Assignment.

Step 3: Enable Full-Text Search at the Instance Level

  • Open SQL Server Management Studio (SSMS) and connect to the affected user instance.
  • Run the following T-SQL command to confirm full-text support status:
SELECT SERVERPROPERTY('IsFullTextInstalled');
  • If the result returns 0, the feature is not installed at the instance level; re-run Step 1 and ensure the correct instance is selected during feature addition.

Step 4: Rebuild or Repair the Full-Text Catalog

  • Navigate to Object Explorer > Databases > [Your Database] > Storage > Full Text Catalogs.
  • Right-click the affected catalog and select Rebuild to clear any corruption.
  • Alternatively, run the following command in SSMS:
ALTER FULLTEXT CATALOG [YourCatalogName] REBUILD;

Step 5: Restart SQL Server Services

  • Open services.msc, restart SQL Server (MSSQLSERVER) and SQL Full-text Filter Daemon Launcher services in sequence.
  • Confirm no dependent services fail to restart by checking the Event Viewer > Windows Logs > Application for related errors.

Alternative or Verification Steps

  • Run SELECT fulltextserviceproperty('IsFullTextInstalled'); in SSMS — a return value of 1 confirms the feature is active and the issue is resolved.
  • If the error persists, consider creating a new user instance with Full-Text Search explicitly enabled during setup, then migrate the affected database to the new instance using a backup/restore operation.

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

Troubleshooting Guide: Error 9979 – Full-Text Catalog Offline After Upgrade

Why This Error Happens

This error occurs during a SQL Server upgrade when the engine attempts to recreate existing full-text catalogs at their original file system path, but fails to do so. The most common root causes are the original catalog directory no longer existing, the SQL Server service account lacking NTFS write permissions on the target path, or the path referencing a drive letter/mount point that is invalid on the new Windows Server 2025 or Windows 11 host. Because the catalog cannot be physically created, SQL Server marks it as OFFLINE rather than failing the entire upgrade.

Step-by-Step Resolution Guide

Step 1: Identify the Failed Catalog and Original Path

  • Check the SQL Server Error Log or upgrade log (located at C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Log\ERRORLOG) for the exact catalog name and path referenced in Error 9979.
  • Run the following query to confirm the catalog status:
SELECT name, is_fulltext_enabled, data_space_id 
FROM sys.fulltext_catalogs;
  • Note the database name and catalog name reported in the warning message.

Step 2: Verify and Correct File System Permissions

  • Navigate to the intended catalog path (e.g., D:\SQLData\FTCatalogs\) in File Explorer.
  • Right-click the folder, select Properties > Security, and confirm the SQL Server service account (e.g., NT Service\MSSQLSERVER) has Full Control.
  • If the folder does not exist, create it manually and grant permissions using PowerShell:
icacls "D:\SQLData\FTCatalogs" /grant "NT SERVICE\MSSQLSERVER:(OI)(CI)F"

Step 3: Rebuild the Offline Full-Text Catalog

  • Connect to the affected database in SQL Server Management Studio (SSMS).
  • Run the rebuild command, pointing to a valid, accessible path:
ALTER FULLTEXT CATALOG [YourCatalogName] REBUILD;
  • If the original path is permanently unavailable, drop and recreate the catalog with a new path:
DROP FULLTEXT CATALOG [YourCatalogName];
CREATE FULLTEXT CATALOG [YourCatalogName] 
IN PATH 'D:\SQLData\FTCatalogs' 
AS DEFAULT;

Step 4: Re-associate Full-Text Indexes

  • If the catalog was dropped and recreated, re-link any full-text indexes that were previously pointing to it.
  • Use ALTER FULLTEXT INDEX ON [TableName] SET CHANGE_TRACKING AUTO; to restore automatic population and ensure indexing resumes immediately.

Alternative or Verification Steps

  • Verify the Fix: Run SELECT name, is_fulltext_enabled FROM sys.fulltext_catalogs WHERE name = 'YourCatalogName'; and confirm the catalog status in the SSMS Object Explorer shows “Online” rather than “Offline/Unavailable.”
  • Alternative Solution: If permissions continue to block creation, temporarily move the catalog to the default SQL Server data directory (e.g., C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\DATA\), which inherently has the correct service account permissions already configured.

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

Troubleshooting Guide: SQL Server Error 9980 — “Variable parameters cannot be passed to fulltext predicates: contains”

Why This Error Happens

This error occurs because SQL Server’s full-text search engine (CONTAINS/FREETEXT predicates) requires the search string to be resolved at parse/compile time, not at execution time. When a Transact-SQL variable is passed directly as the search condition inside a CONTAINS predicate, the query optimizer cannot statically validate or optimize the full-text expression, triggering Error 9980. This typically happens in stored procedures, parameterized queries, or dynamically generated T-SQL where developers attempt to pass @variable directly into CONTAINS(column, @variable) instead of using dynamic SQL or parameterized full-text constructs correctly.

Step-by-Step Resolution Guide

Step 1: Identify the Offending Query

  • Locate the stored procedure, function, or ad-hoc query throwing Error 9980.
  • Check SQL Server Management Studio (SSMS) error details or the Windows Event Viewer under Applications and Services Logs > MSSQLSERVER for the exact line number.
  • Confirm the query uses a pattern like WHERE CONTAINS(column_name, @searchVariable).

Step 2: Convert to Dynamic SQL Execution

  • Rewrite the static query to use sp_executesql so the variable is injected into the SQL string before execution, rather than passed as a native parameter to CONTAINS.
  • Example fix:
  DECLARE @sql NVARCHAR(MAX);
  DECLARE @searchTerm NVARCHAR(100) = '"server*"';
  SET @sql = N'SELECT * FROM Documents WHERE CONTAINS(ContentColumn, @term)';
  EXEC sp_executesql @sql, N'@term NVARCHAR(100)', @term = @searchTerm;
  • Note: sp_executesql does support parameterization for CONTAINS, unlike inline variable substitution — this is the officially supported workaround from Microsoft.

Step 3: Validate Full-Text Catalog and Index Health

  • Run the following to ensure the underlying full-text catalog is not corrupted, which can sometimes mask as predicate errors:
  SELECT * FROM sys.fulltext_catalogs;
  SELECT * FROM sys.dm_fts_index_population;
  • If the catalog shows a “FAILED” or “PAUSED” status, rebuild it:
  ALTER FULLTEXT CATALOG YourCatalogName REBUILD;

Step 4: Update SQL Server 2025 Cumulative Update

  • Open SQL Server Configuration Manager on Windows Server 2025 / Windows 11 and verify the current build number.
  • Navigate to C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Log\ERRORLOG to check the version string.
  • Apply the latest Cumulative Update (CU) from Microsoft, as early 2025 builds had known regressions with full-text predicate parameter binding.

Alternative or Verification Steps

  • Verify the Fix: Re-run the stored procedure or query using sp_executesql with a sample parameter value and confirm Error 9980 no longer appears in SSMS or the SQL Server log.
  • Alternative Workaround: If sp_executesql is not feasible due to application architecture, use CONTAINSTABLE() in a derived table/JOIN instead of embedding CONTAINS directly in the WHERE clause, as CONTAINSTABLE often handles parameterized inputs more flexibly in legacy codebases.

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

Troubleshooting Guide: SQL Server Error 9977 – Full-Text Catalog Population Mismatch

Why This Error Happens

This warning occurs when SQL Server detects that the metadata timestamp stored in the full-text catalog files on disk does not match the population timestamp recorded in the database’s internal system tables. This desynchronization typically happens after a database is detached and reattached, restored from a backup, or moved to a new server/drive without a proper full-text catalog rebuild. It can also result from an improper shutdown or disk-level corruption that leaves the catalog files in an inconsistent state relative to the database engine’s records.

Step-by-Step Resolution Guide

Step 1: Verify the Full-Text Service Status

  • Open SQL Server Configuration Manager on your Windows Server 2025 / Windows 11 machine.
  • Confirm that the SQL Full-Text Filter Daemon Launcher service (MSSQLFDLauncher) is running for your specific instance.
  • If stopped, right-click and select Start, then set the Startup Type to Automatic.

Step 2: Rebuild the Affected Full-Text Catalog

  • Open SQL Server Management Studio (SSMS) and connect to the instance reporting the error.
  • Navigate to Databases > [Your Database] > Storage > Full Text Catalogs.
  • Right-click the specific catalog mentioned in the error log and select Rebuild.
  • Alternatively, run the following T-SQL command to force a rebuild:
  ALTER FULLTEXT CATALOG [YourCatalogName] REBUILD;

Step 3: Force a Full Population

  • Once the rebuild completes, the catalog will be empty, so you must repopulate it.
  • Execute the following query to start a full crawl, which aligns the file timestamps with the database records:
  ALTER FULLTEXT CATALOG [YourCatalogName] START FULL POPULATION;
  • Monitor the sys.dm_fts_index_population dynamic management view to track progress until the status shows “Idle.”

Step 4: Check File System Permissions

  • If the rebuild fails, navigate to the physical directory where the catalog resides (usually within the DATA folder of your SQL instance, e.g., C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\DATA\).
  • Right-click the folder, go to Properties > Security, and ensure the SQL Server service account (e.g., NT Service\MSSQLSERVER) has Full Control permissions.

Alternative or Verification Steps

  • Verification: Run SELECT * FROM sys.fulltext_catalogs; and check the is_fulltext_stoplist_default and population status columns to confirm the catalog is marked as “Available” and no longer flagged as corrupt in the SQL Server Error Log.
  • Alternative Fix: If the rebuild repeatedly fails due to file locking, stop the SQL Server service entirely via services.msc, manually delete the orphaned catalog folder from the file system, restart the service, and then recreate the full-text catalog from scratch using CREATE FULLTEXT CATALOG.

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

Troubleshooting Guide: SQL Server Error 9978 – Full-Text Index Disabled Due to Invalid Key Column

Why This Error Happens

This warning occurs during a SQL Server upgrade when the full-text catalog detects that the designated unique key column on a table no longer satisfies full-text indexing requirements. Typically, this happens because the column’s data type was changed, the unique index backing the full-text key was dropped or altered, or the column no longer enforces uniqueness/non-nullability as required by the Full-Text Engine. Since SQL Server 2025 enforces stricter validation during metadata upgrade, any mismatch between the expected key constraints and the actual table schema causes the engine to automatically disable the full-text index rather than risk corruption.

Step-by-Step Resolution Guide

Step 1: Identify the Affected Table and Column

  • Open SQL Server Management Studio (SSMS) and connect to the upgraded instance.
  • Run the following query to locate tables with disabled full-text indexes:
  SELECT object_name(fic.object_id) AS TableName, fic.is_enabled 
  FROM sys.fulltext_indexes fic 
  WHERE fic.is_enabled = 0;
  • Note the table name reported in the Event Viewer under Event ID 9978 (Windows Logs > Application).

Step 2: Validate the Unique Key Column

  • Check that the column originally used as the full-text key still has a valid, unique, single-column, non-nullable index:
  EXEC sp_help 'YourTableName';
  • Confirm the column has not been altered to a nullable type or changed to an unsupported data type (e.g., XML, TEXT, or user-defined types are invalid as full-text keys).
  • If the unique index was dropped, recreate it:
  ALTER TABLE YourTableName 
  ADD CONSTRAINT PK_YourTable UNIQUE (KeyColumnName);

Step 3: Rebuild the Full-Text Index

  • Drop the existing (disabled) full-text index to clear the broken metadata:
  DROP FULLTEXT INDEX ON YourTableName;
  • Recreate the full-text index, explicitly specifying the valid key index:
  CREATE FULLTEXT INDEX ON YourTableName(ColumnToIndex) 
  KEY INDEX PK_YourTable 
  ON YourFullTextCatalog;
  • Restart the SQL Server Full-Text Filter Daemon Launcher service via services.msc or PowerShell:
  Restart-Service -Name "MSSQLFDLauncher"

Step 4: Re-run Upgrade Validation

  • Trigger a manual full-text catalog rebuild to force validation against the current schema:
  ALTER FULLTEXT CATALOG YourFullTextCatalog REBUILD;
  • Monitor SQL Server Error Log for confirmation that Error 9978 no longer appears for this table.

Alternative or Verification Steps

  • Verify the fix by querying sys.fulltext_indexes again and confirming is_enabled = 1 for the affected table.
  • If the error persists, use Full-Text Index Wizard in SSMS (right-click table > Full-Text Index > Define Full-Text Index) to manually reselect a valid unique key column and rebuild the index from scratch.

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

Why This Error Happens

Error 9975 occurs when a ALTER FULLTEXT INDEX ... RESUME POPULATION command is issued against a full-text catalog or index that is not currently in a paused state. SQL Server 2025 only allows the resume operation to transition a population from “paused” to “in progress”; if the population has already completed, failed, or was never paused in the first place, the command is rejected and ignored rather than throwing a hard failure. This is typically a timing/state-synchronization issue where an automation script, maintenance job, or administrator sends a resume command without first validating the current crawl status via sys.dm_fts_index_population.

Step-by-Step Resolution Guide

Step 1: Verify the Current Population Status

  • Open SQL Server Management Studio (SSMS) and connect to the target instance running on Windows Server 2025 / Windows 11.
  • Run the following query to check the live status of the population:
  SELECT table_id, population_type, status, status_description 
  FROM sys.dm_fts_index_population 
  WHERE database_id = DB_ID('YourDatabaseName');
  • Confirm whether status_description shows “Paused,” “In progress,” or “Idle.” Only “Paused” supports a resume command.

Step 2: Cancel Conflicting Automation Jobs

  • Check SQL Server Agent (via SSMS > SQL Server Agent > Jobs) for any maintenance plans scheduled to resume full-text population on a timer.
  • Disable or reschedule any job that fires RESUME POPULATION without first checking state, as overlapping job schedules are the most common cause of this warning.
  • Use sp_help_job in a query window to list active schedules tied to full-text maintenance.

Step 3: Correct the Full-Text Catalog State

  • If the population has actually finished or failed (not paused), do not issue a resume command. Instead, trigger a fresh population:
  ALTER FULLTEXT INDEX ON YourTableName START FULL POPULATION;
  • If the index appears stuck in a phantom “paused” state due to catalog corruption, rebuild the full-text catalog via:
  ALTER FULLTEXT CATALOG YourCatalogName REBUILD;
  • Ensure the SQL Server service account has read/write access to the full-text catalog folder, typically located at C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\FTData\ on Windows Server 2025.

Step 4: Restart the Full-Text Filter Daemon Launcher Service

  • Open services.msc on Windows Server 2025 / Windows 11.
  • Locate SQL Full-text Filter Daemon Launcher (MSSQLSERVER) and restart it to clear any stale population locks.
  • Re-run Step 1 to confirm the status has reset to “Idle” before attempting any new population command.

Alternative or Verification Steps

  • After applying fixes, re-run the sys.dm_fts_index_population query from Step 1 — a successful fix shows status_description cycling correctly from “In progress” to “Idle” without throwing Error 9975.
  • If the warning persists, drop and recreate the full-text index entirely using DROP FULLTEXT INDEX ON YourTableName followed by CREATE FULLTEXT INDEX, which guarantees a clean population state at the cost of a full re-index.

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

Troubleshooting Guide: SQL Server Error 9976 — Service Shutting Down Unexpectedly

Why This Error Happens

Error 9976 occurs when the SQL Server service encounters a critical, unrecoverable condition during runtime and forces a controlled shutdown to prevent data corruption. This is typically triggered by corrupted system database files (particularly master or tempdb), insufficient permissions on the service account for key directories, or a conflict caused by an improperly configured startup parameter. In some cases, this error also surfaces when Windows Server 2025 security policies (such as newly enforced Credential Guard or Virtualization-Based Security) block the SQL Server process from accessing protected memory pages during initialization.

Step-by-Step Resolution Guide

Step 1: Verify Service Account Permissions

  • Open Services.msc and locate the SQL Server (MSSQLSERVER) or named instance service.
  • Confirm the “Log On As” account has Full Control on C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\DATA.
  • Re-apply permissions using: icacls "C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\DATA" /grant "NT SERVICE\MSSQLSERVER":(OI)(CI)F
  • Restart the service to test if the permission reset resolves the shutdown.

Step 2: Check the SQL Server Error Log for Root Cause

  • Navigate to C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Log\ERRORLOG.
  • Search for entries immediately preceding Error 9976, such as “FCB::Open failed” or “Unable to open the physical file.”
  • Identify if a specific database file (.mdf/.ldf) is flagged as inaccessible or corrupt.
  • Note the exact timestamp to cross-reference with Windows Event Viewer (System log).

Step 3: Rebuild or Repair System Databases

  • If tempdb or master is corrupted, start SQL Server in single-user mode via Command Prompt: NET START MSSQLSERVER /f /T3608
  • Connect via sqlcmd -S .\MSSQLSERVER and run DBCC CHECKDB against suspect databases.
  • If master is unrecoverable, use the SQL Server 2025 installation media to run the REBUILDDATABASE setup action.
  • Exit single-user mode and restart the service normally.

Step 4: Disable Conflicting Security Policies

  • Open Local Group Policy Editor (gpedit.msc) and navigate to Computer Configuration > Administrative Templates > System > Device Guard.
  • Temporarily disable Virtualization Based Security to rule out memory-locking conflicts with the SQL Server buffer pool.
  • Reboot the server and attempt to start the MSSQLSERVER service again.

Alternative or Verification Steps

  • Verify the fix by opening Event Viewer > Windows Logs > System and confirming no new Event ID 9976 entries appear after three consecutive service restarts.
  • If the error persists, run sqlservr.exe -c -m directly from the Binn directory in an elevated Command Prompt to view real-time console output and catch the exact exception bypassing the Windows Service Manager.

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

Troubleshooting Guide: SQL Server Error 9974 — Full-Text Catalog Population Pause Restriction

Why This Error Happens

This warning occurs because SQL Server only supports pausing a full population crawl; incremental, manual, or background update populations do not support the pause operation and can only be stopped entirely. The error is typically triggered when an automated maintenance script, SQL Agent job, or third-party indexing tool issues an ALTER FULLTEXT INDEX ... PAUSE POPULATION command against a catalog that is currently running a non-full crawl type. This is a logic/scripting mismatch rather than a corruption or permissions issue — the command is being sent to a population type that structurally cannot honor it.

Step-by-Step Resolution Guide

Step 1: Identify the Current Population Type

  • Open SQL Server Management Studio (SSMS) and connect to your SQL Server 2025 instance.
  • Run the following query to check the active crawl type on the affected catalog:
SELECT name, population_type_desc, crawl_start_date, status_desc
FROM sys.fulltext_indexes AS fi
JOIN sys.fulltext_catalogs AS fc ON fi.fulltext_catalog_id = fc.fulltext_catalog_id
WHERE status_desc <> 'IDLE';
  • Confirm whether population_type_desc shows INCREMENTAL, MANUAL, or FULL. Only FULL supports pausing.

Step 2: Correct the Automation Script or Job Step

  • Navigate to SQL Server Agent > Jobs in SSMS and locate the job step issuing the PAUSE command (commonly found in maintenance plans or custom indexing jobs).
  • Replace any ALTER FULLTEXT INDEX ... PAUSE POPULATION command with a conditional STOP POPULATION command when the crawl type is not full:
IF EXISTS (SELECT 1 FROM sys.fulltext_indexes WHERE population_type_desc <> 'FULL')
    ALTER FULLTEXT INDEX ON [YourTable] STOP POPULATION;
ELSE
    ALTER FULLTEXT INDEX ON [YourTable] PAUSE POPULATION;
  • Save the updated job step and disable any legacy script referencing hard-coded PAUSE calls.

Step 3: Clear Stuck Population Queues (If Applicable)

  • If the warning persists even after correcting the script, restart the Full-Text Filter Daemon Launcher service.
  • On Windows Server 2025 / Windows 11, open services.msc and restart SQL Full-text Filter Daemon Launcher (MSSQLSERVER).
  • Alternatively, restart via PowerShell (run as Administrator):
Restart-Service -Name "MSSQLFDLauncher"

Step 4: Rebuild the Full-Text Catalog if the Crawl Remains Inconsistent

  • If the population status remains stuck in a non-idle state after stopping, rebuild the catalog to reset its crawl history:
ALTER FULLTEXT CATALOG [YourCatalogName] REBUILD;
  • Note: This forces a full population on next crawl, which will then correctly support pause/resume operations going forward.

Alternative or Verification Steps

  • Verify the fix by re-running the sys.fulltext_indexes query from Step 1 after triggering a new crawl — confirm population_type_desc = 'FULL' before attempting a pause.
  • If the issue persists across restarts, check the SQL Server Error Log (C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Log\ERRORLOG) for repeated Event ID 9974 entries and correlate timestamps with the job that triggered the pause command.

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

Troubleshooting Guide: SQL Server Error 9972 — Full-Text DDL Command Failure

Why This Error Happens

This error occurs because SQL Server 2025 attempts to execute a full-text DDL command (such as creating or altering a full-text catalog or index) while the target database is still in a transitional state—such as RECOVERING, RESTORING, or SUSPECT—rather than fully ONLINE. Full-text indexing operations require exclusive access to stable database metadata and filegroup structures, which are unavailable until the recovery process completes. This commonly happens when scripts or automated deployment pipelines execute full-text commands immediately after a database restore or attach operation without verifying the database state first.

Step-by-Step Resolution Guide

Step 1: Verify the Current Database State

  • Open SQL Server Management Studio (SSMS) or a query window connected to the instance.
  • Run the following query to check the database status:
  SELECT name, state_desc FROM sys.databases WHERE name = 'YourDatabaseName';
  • Confirm whether the state_desc column returns ONLINE, RECOVERING, RESTORING, or SUSPECT.

Step 2: Wait for Recovery or Restore to Complete

  • If the state is RECOVERING, allow SQL Server time to finish the recovery process; large databases or those with long transaction logs may take several minutes.
  • Monitor progress via the SQL Server Error Log at C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Log\ERRORLOG.
  • Avoid issuing any full-text DDL commands (CREATE FULLTEXT CATALOG, CREATE FULLTEXT INDEX) until the state changes to ONLINE.

Step 3: Resolve a SUSPECT or Stuck Database

  • If the database is stuck in SUSPECT mode, run:
  ALTER DATABASE YourDatabaseName SET EMERGENCY;
  DBCC CHECKDB (YourDatabaseName, REPAIR_ALLOW_DATA_LOSS);
  ALTER DATABASE YourDatabaseName SET ONLINE;
  • Check the underlying data and log files for corruption or access issues in their configured path, typically C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\DATA\.
  • Ensure the SQL Server Service Account has full read/write permissions on this directory.

Step 4: Re-run the Full-Text DDL Command

  • Once state_desc confirms ONLINE, re-execute your original full-text DDL statement.
  • Example:
  CREATE FULLTEXT CATALOG ftCatalog AS DEFAULT;
  • Confirm the command completes without triggering Error 9972 again.

Alternative or Verification Steps

  • Verify success by querying sys.fulltext_catalogs and sys.fulltext_indexes to ensure the new objects were created and are listed with a is_enabled status of 1.
  • If the database frequently enters a transitional state during automated deployments, add a polling loop in your deployment script that checks DATABASEPROPERTYEX('YourDatabaseName', 'Status') and waits for an ONLINE result before issuing any full-text commands.