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

Troubleshooting Guide: Error 12354 in Microsoft SQL Server 2025

Why This Error Happens

Error 12354 occurs when a SQL Server function—such as a string manipulation, full-text search, or comparison function—is executed against a column or variable using the Japanese_140 collation, but the specific build or edition of SQL Server 2025 does not have the underlying linguistic component (NLS module) compiled to support that function. This typically happens because the Japanese_140 collation relies on newer Unicode-based sorting rules that certain legacy or specific T-SQL functions (like older LIKE pattern matches or specific STRING_SPLIT configurations) cannot parse. Additionally, this can be triggered by a mismatch between the OS-level language pack installed on Windows Server 2025/Windows 11 and the SQL Server instance’s collation settings.

Step-by-Step Resolution Guide

Step 1: Identify the Conflicting Collation and Function

  • Open SQL Server Management Studio (SSMS) and run the query that triggered the error to identify the specific function (%ls) mentioned in the error log.
  • Check the column collation using the command: SELECT name, collation_name FROM sys.columns WHERE object_id = OBJECT_ID('YourTableName');
  • Verify if the collation is strictly Japanese_140_SC_UTF8 or a variant, as UTF-8 variants often cause this specific conflict with legacy functions.

Step 2: Update Windows Language and Regional Support

  • Navigate to Settings > Time & Language > Language & Region on your Windows Server 2025 or Windows 11 machine.
  • Ensure the Japanese language pack is fully installed, not just added as a preference, as missing base characters can cause SQL Server to throw this support error.
  • Restart the “SQL Server (MSSQLSERVER)” service via services.msc after the language pack installation completes to refresh the OS-level locale cache.

Step 3: Modify the Query to Use a COLLATE Override

  • Rewrite the specific query causing the error to force a compatible collation for that single operation rather than changing the whole database.
  • Use the following syntax structure in your T-SQL script:
  • SELECT YourColumn COLLATE Japanese_XJIS_140_CI_AS FROM YourTable WHERE Condition;
  • This bypasses the UTF-8 specific limitation by reverting to the double-byte character set (DBCS) version of the Japanese collation for that specific transaction.

Step 4: Apply the Latest Cumulative Update (CU)

  • Check the current build number by running: SELECT @@VERSION;
  • Visit the Microsoft documentation to download the latest Cumulative Update for SQL Server 2025, as this specific function/collation conflict is often patched in service updates.
  • Install the update and perform a full restart of the server to ensure the native client libraries (SQLNCLI) are updated alongside the engine.

Alternative or Verification Steps

  • Verification: Re-run the original failing query in SSMS. If successful, check the ERRORLOG file located in C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Log\ to confirm no new instances of Error 12354 have been logged.
  • Alternative: If the error persists, rebuild the specific database using a Latin1_General_100_CI_AS collation for the master database while keeping Japanese_140 only at the column level for the specific Japanese text fields, isolating the conflict from system functions.