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

Troubleshooting Guide: SQL Server Error 9818 — Unsupported Culture Parameter

Why This Error Happens

Error 9818 occurs when a T-SQL function (such as FORMAT, PARSE, TRY_PARSE, or AT TIME ZONE-related culture operations) receives a culture argument that is not registered in the .NET Globalization tables used by SQL Server 2025’s CLR runtime. This commonly happens due to a typo in the locale name (e.g., 'en-USA' instead of 'en-US'), an outdated or missing ICU/NLS globalization data package on Windows Server 2025, or a mismatch between the SQL Server collation/language settings and the invariant culture mode now enforced by the hosting .NET runtime. It can also surface after an in-place upgrade where the underlying CLR host was reconfigured to run in a reduced globalization footprint.

Step-by-Step Resolution Guide

Step 1: Validate the Culture String Syntax

  • Open the query that throws Error 9818 and locate the exact culture string passed into the function (e.g., FORMAT(GetDate(), 'd', 'en-US')).
  • Cross-check the string against the official BCP-47 culture name list (e.g., en-US, fr-FR, de-DE) — SQL Server is case-sensitive to malformed separators like underscores (en_US is invalid; use en-US).
  • Run SELECT * FROM sys.fn_helpcollations(); to confirm the server recognizes related collation/locale naming conventions.

Step 2: Confirm .NET Globalization Invariant Mode Is Disabled

  • SQL Server 2025 relies on the .NET globalization-invariant runtime setting being OFF for full culture support.
  • Navigate to the SQL Server installation folder, typically C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Binn\.
  • Open sqlservr.exe.config (or the relevant runtime config file) and verify the entry: <configuration><runtime><AppContextSwitchOverrides value="System.Globalization.Invariant=false" /></runtime></configuration>.
  • Save the file and restart the SQL Server service via services.msc or net stop MSSQLSERVER && net start MSSQLSERVER.

Step 3: Install or Repair Windows Globalization Data

  • On Windows Server 2025 / Windows 11, open PowerShell as Administrator and run Get-WindowsCapability -Online | Where-Object {$_.Name -like "*Language*"} to check installed language packs.
  • If the required culture pack is missing, install it with Add-WindowsCapability -Online -Name "Language.Basic~~~en-US~0.0.1.0" (replace with the relevant culture code).
  • Alternatively, run DISM /Online /Cleanup-Image /RestoreHealth followed by sfc /scannow to repair corrupted system globalization files (ICU data).

Step 4: Apply the Latest SQL Server 2025 Cumulative Update

  • Microsoft periodically patches ICU culture mapping tables bundled with SQL Server.
  • Download and apply the latest Cumulative Update (CU) from the Microsoft Update Catalog matching your SQL Server 2025 build.
  • After patching, re-run SELECT @@VERSION; to confirm the build number has incremented, then retest the failing query.

Alternative or Verification Steps

  • Verify the fix by re-executing the original failing statement (e.g., SELECT FORMAT(SYSDATETIME(), 'D', 'en-US');) and confirming it returns formatted output instead of Error 9818.
  • As a quick workaround while patching is pending, replace the custom culture parameter with the invariant culture (empty string '') or a known-safe culture like 'en-US' to unblock the application temporarily.