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

Troubleshooting Guide: SQL Server Error 7368 – Linked Server Column Level Collation Mismatch

Why This Error Happens

This error occurs when the OLE DB provider used by a linked server enforces column-level collation, but the collation settings between the linked server and the local SQL Server instance do not match or cannot be reconciled. It typically arises when querying heterogeneous data sources (such as Excel, Access, or older OLE DB providers) where the provider reports a different collation sequence than what SQL Server 2025 expects for the operation being performed. This mismatch prevents SQL Server from safely comparing, sorting, or joining character-based data across the linked connection.

Step-by-Step Resolution Guide

Step 1: Verify the Linked Server’s Collation Compatibility Setting

  • Open SSMS and navigate to Server Objects > Linked Servers.
  • Right-click the linked server in question and select Properties.
  • Under the General page, confirm whether “Collation Compatible” is checked; if the source and destination collations truly match, enable this setting.
  • Run sp_linkedservers to review the current provider and product name for the connection.

Step 2: Adjust the Collation Setting via T-SQL

  • Use sp_serveroption to explicitly set the collation compatibility flag:
  EXEC sp_serveroption 'YourLinkedServerName', 'collation compatible', 'true';
  • If the external data source uses a different collation than your SQL Server instance, instead set the “use remote collation” option:
  EXEC sp_serveroption 'YourLinkedServerName', 'use remote collation', 'true';
  EXEC sp_serveroption 'YourLinkedServerName', 'collation name', 'SQL_Latin1_General_CP1_CI_AS';
  • Replace the collation name with the one matching your source system’s actual collation.

Step 3: Update or Reconfigure the OLE DB Provider

  • Open Component Services (dcomcnfg.exe) on Windows Server 2025 / Windows 11.
  • Navigate to Component Services > Computers > My Computer > DCOM Config, locate the provider (e.g., MSOLEDBSQL, ACE.OLEDB.16.0).
  • Ensure the provider’s “Allow InProcess” and “Dynamic Parameter” properties are enabled via sp_MSset_oledb_prop if querying requires it.
  • Confirm you are using the latest Microsoft OLE DB Driver (MSOLEDBSQL19 or newer) compatible with SQL Server 2025, as outdated drivers mishandle column-level collation metadata.

Step 4: Rewrite the Query to Force Explicit Collation

  • If the setting changes do not resolve the issue, modify the query to explicitly cast the collation on the problematic column:
  SELECT * FROM OpenQuery(YourLinkedServerName, 'SELECT ColumnName COLLATE DATABASE_DEFAULT FROM TableName');
  • Alternatively, use the COLLATE clause directly against the local database’s default collation to bypass the provider-level enforcement.

Alternative or Verification Steps

  • After applying the changes, re-run the original query or stored procedure that triggered Error 7368 and confirm it executes without throwing the collation warning/error.
  • If the error persists, drop and recreate the linked server definition entirely using sp_dropserver and sp_addlinkedserver, ensuring the correct provider string and server options are specified from the start.