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

Troubleshooting Guide: Error 10794 — “%SMSG ‘%ls’ is not supported with %SMSG”

Why This Error Happens

This error occurs when a Transact-SQL statement, clause, or feature is executed against a database object type that does not support it — commonly seen when applying memory-optimized table syntax, columnstore operations, or specific index hints to incompatible table types (such as temporal tables, external tables, or system-versioned tables). It is a compatibility-layer restriction enforced by the SQL Server Engine rather than a corruption or permissions issue. This typically surfaces after an upgrade to SQL Server 2025 where deprecated syntax or legacy compatibility-level scripts conflict with newer engine restrictions.

Step-by-Step Resolution Guide

Step 1: Identify the Exact Statement and Object Triggering the Error

  • Capture the full error message text, replacing %S_MSG and %ls placeholders with the actual values shown in SSMS or the SQL Server Error Log.
  • Check C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Log\ERRORLOG for the full context of the failed query.
  • Run SELECT object_id, name, type_desc FROM sys.objects WHERE name = 'YourObjectName'; to confirm the object type (e.g., memory-optimized, temporal, external).

Step 2: Verify Feature Compatibility with the Target Object Type

  • Query the current database compatibility level: SELECT name, compatibility_level FROM sys.databases WHERE name = 'YourDatabaseName';
  • Cross-reference the unsupported clause (e.g., WITH (MEMORY_OPTIMIZED = ON), ONLINE = ON, or columnstore hints) against Microsoft’s SQL Server 2025 Books Online compatibility matrix for that object type.
  • Remove or rewrite the unsupported clause from the script — for example, drop ONLINE = ON when rebuilding indexes on system-versioned temporal tables, which still have partial restrictions.

Step 3: Update or Rewrite the Offending Script

  • Modify the T-SQL script to use a supported alternative syntax (e.g., switch from an inline index hint to a separate CREATE INDEX statement executed after table creation).
  • If using ORM-generated queries (Entity Framework, Dapper, etc.), check the ORM version for SQL Server 2025 compatibility patches and update the NuGet package.
  • Save the corrected script and re-run it in a non-production environment first.

Step 4: Apply the Latest Cumulative Update

  • Open SQL Server Configuration Manager on Windows Server 2025 / Windows 11 and confirm the current build number via SELECT @@VERSION;.
  • Download and install the latest Cumulative Update (CU) for SQL Server 2025 from the Microsoft Update Catalog, as this error message’s underlying feature gaps are frequently patched.
  • Restart the SQL Server (MSSQLSERVER) service from services.msc after the update completes.

Alternative or Verification Steps

  • Re-execute the original query or application workload against a test database to confirm Error 10794 no longer appears in SSMS or the Error Log.
  • If the error persists, isolate the feature in question by testing it against a standard (non-specialized) table — if it succeeds there, the issue is confirmed as an object-type incompatibility requiring a schema redesign rather than a server-side fix.