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

Why This Error Happens

Error 5375 occurs when SQL Server 2025 attempts to directly reference a hidden internal computed column that backs a filtered or expression-based index, which is not permitted outside of internal query processing operations. This typically surfaces when a query, DBCC command, or third-party tool tries to explicitly select, update, or reference this system-generated column by name. It can also appear after a failed index rebuild or an in-place upgrade from an older SQL Server version where metadata for expression indexes became inconsistent.

Step-by-Step Resolution Guide

Step 1: Identify the Offending Query or Object

  • Capture the exact query text from the error message in SSMS or the SQL Server error log (Event Viewer > Applications and Services Logs > MSSQLSERVER).
  • Run the following to locate indexes with expression-based or computed definitions on the affected table:
SELECT i.name, i.index_id, c.name AS column_name
FROM sys.indexes i
JOIN sys.index_columns ic ON i.object_id = ic.object_id AND i.index_id = ic.index_id
JOIN sys.columns c ON ic.object_id = c.object_id AND ic.column_id = c.column_id
WHERE i.object_id = OBJECT_ID('YourSchema.YourTable');
  • Confirm whether the referenced column name matches an internal %hind% or expression-generated identifier rather than a user-defined column.

Step 2: Rebuild or Drop/Recreate the Affected Index

  • Avoid referencing internal columns directly in SELECT, WHERE, or application ORM-generated queries; instead query the base computed column or expression itself.
  • Rebuild the index to force metadata regeneration:
ALTER INDEX ALL ON YourSchema.YourTable REBUILD;
  • If rebuild fails or the error persists, drop and recreate the index explicitly:
DROP INDEX IX_YourExpressionIndex ON YourSchema.YourTable;
CREATE INDEX IX_YourExpressionIndex ON YourSchema.YourTable (CONVERT(date, YourDateTimeColumn));

Step 3: Check for Upgrade or Compatibility Level Issues

  • Verify the database compatibility level matches SQL Server 2025 requirements:
SELECT name, compatibility_level FROM sys.databases WHERE name = 'YourDatabase';
ALTER DATABASE YourDatabase SET COMPATIBILITY_LEVEL = 170;
  • Run DBCC CHECKDB('YourDatabase') WITH DATA_PURITY to rule out metadata or page-level corruption affecting internal column structures.
  • Restart the SQL Server service via Services.msc or net stop MSSQLSERVER && net start MSSQLSERVER on Windows Server 2025 after applying compatibility or index changes.

Step 4: Restrict Direct Application Access

  • Audit any third-party reporting tools, ORMs (e.g., Entity Framework, Hibernate), or linked server queries that may auto-generate SELECT * statements exposing hidden columns.
  • Explicitly list required columns in views and stored procedures instead of using SELECT * on tables containing expression indexes.

Alternative or Verification Steps

  • Re-run the original failing query or application workflow to confirm error 5375 no longer appears in the SQL Server error log or Event Viewer.
  • If the issue persists after rebuilding, export the table data, drop all expression/filtered indexes entirely, recreate the table schema cleanly, and reapply indexes one at a time to isolate the corrupted definition.