Troubleshooting Guide: Error 2775 – “The Code Page %d Is Not Supported by the Server”
Why This Error Happens
This error occurs when SQL Server 2025 encounters a client or data source requesting a code page (character encoding) that is not installed or recognized by the Windows Server 2025 / Windows 11 host’s regional and language settings. It is commonly triggered during BCP, BULK INSERT, or linked server operations where the source file’s encoding does not match any code page registered in the system’s NLS (National Language Support) files. Corrupted or missing nlsXXXX.dll files under SQL Server\MSSQL\Binn can also cause this mismatch, as can collation settings that reference a legacy code page unsupported in newer OS builds.
Step-by-Step Resolution Guide
Step 1: Identify the Problematic Code Page
- Check the SQL Server error log at
C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Log\ERRORLOGto find the exact numeric code page value (%d) reported. - Cross-reference this number against Microsoft’s official code page identifiers list to confirm whether it is a legacy or regional-only encoding.
- If the error originates from a BCP command, re-run it with
-Cflag explicitly set to confirm the intended code page, e.g.,bcp mydb.dbo.table in data.txt -c -C 1252 -S servername -T.
Step 2: Verify and Install Required Language/Region Support
- Open Settings > Time & Language > Language & Region on Windows 11, or use Server Manager > Add Roles and Features > Language Packs on Windows Server 2025.
- Install the specific language pack associated with the missing code page (e.g., Chinese Simplified for code page 936, or Cyrillic for 1251).
- Restart the SQL Server service via
services.mscor run:
net stop MSSQLSERVER && net start MSSQLSERVER
Step 3: Correct the Database or Column Collation
- Run the following query to check current collation settings:
SELECT DATABASEPROPERTYEX('YourDBName', 'Collation');
- If the collation uses an outdated code page, alter it to a supported Unicode-compliant collation:
ALTER DATABASE YourDBName COLLATE SQL_Latin1_General_CP1_CI_AS;
- For column-level fixes, use
ALTER TABLE ... ALTER COLUMNwith the corrected collation and ensureNVARCHARis used instead ofVARCHARwhere multi-byte characters are involved.
Step 4: Repair Corrupted NLS Files (If Applicable)
- Navigate to
C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Binn\Resources\1033\and verify the presence ofnlsXXXX.dllfiles. - If files appear corrupted or missing, repair the SQL Server installation via Control Panel > Programs > Microsoft SQL Server 2025 > Repair.
- Re-apply the latest Cumulative Update (CU) package from Microsoft to ensure NLS definitions are current.
Alternative or Verification Steps
- Verify the fix by re-running the original BCP, BULK INSERT, or linked server query that triggered Error 2775 and confirming it completes without encoding warnings.
- As an alternative, export the source data file to UTF-8 or UTF-16 encoding beforehand, bypassing legacy code page dependencies entirely.