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

Troubleshooting Guide: SQL Server Error 7355 – Inconsistent OLE DB Provider Metadata

Why This Error Happens

This error occurs when the OLE DB provider for a linked server reports column metadata (such as name, data type, or ordinal position) during the query planning phase that differs from what it actually returns at execution time. This mismatch is commonly caused by dynamic or computed columns in the remote source (such as views with SELECT *, Excel/Access sources with inconsistent headers, or heterogeneous data in flat files) that cause the provider to infer schema differently across calls. It can also happen due to outdated OLE DB provider drivers or schema caching issues on the linked server connection.

Step-by-Step Resolution Guide

Step 1: Identify the Linked Server and Query Causing the Error

  • Check the SQL Server error log or SSMS error message to identify the exact linked server name referenced in the error (%ls placeholders).
  • Run EXEC sp_linkedservers; in SSMS to confirm the provider type (e.g., MSDASQL, Microsoft.ACE.OLEDB.16.0, SQLNCLI).
  • Isolate the specific query or stored procedure, then run it directly against the linked server using OPENQUERY to reproduce the error in isolation.

Step 2: Disable Metadata Caching or Enable “Lazy Schema Validation” Workaround

  • Open SSMS, navigate to Server Objects > Linked Servers, right-click the affected linked server, and select Properties.
  • Go to the Server Options page and ensure “Dynamic parameters” is set appropriately based on your source.
  • Alternatively, run the following T-SQL to force a fresh metadata read on execution:
  EXEC sp_serveroption 'YourLinkedServerName', 'lazy schema validation', 'true';
  • If using OPENQUERY, explicitly cast and alias every column in the remote query to force consistent typing:
  SELECT CAST(ColumnName AS NVARCHAR(100)) AS ColumnName FROM OPENQUERY(YourLinkedServer, 'SELECT * FROM RemoteTable')

Step 3: Update or Reconfigure the OLE DB Provider

  • Open Component Services (dcomcnfg.exe) on Windows Server 2025 / Windows 11 and verify the provider (e.g., Microsoft.ACE.OLEDB.16.0) has “Allow inprocess” enabled under Linked Server Providers in SSMS (Server Objects > Linked Servers > Providers).
  • Download and install the latest version of the OLE DB driver from Microsoft (e.g., OLE DB Driver 19/20 for SQL Server) to C:\Program Files\Microsoft SQL Server\160\.
  • Restart the SQL Server (MSSQLSERVER) service via services.msc after updating the driver.

Step 4: Rebuild the Remote Query to Avoid Wildcard Selects

  • Replace any SELECT * statements in the linked server query or remote view with explicitly named columns in a fixed order.
  • If the remote source is a file-based provider (Excel/Access/CSV), standardize the header row and ensure no blank or merged cells exist in the first several rows, as providers sample initial rows to infer schema.

Alternative or Verification Steps

  • Re-run the original query or stored procedure that triggered Error 7355; if it completes without the metadata warning, the fix is confirmed.
  • If the error persists, bypass the linked server metadata resolution entirely by using OPENROWSET with an explicit WITH schema definition, which forces SQL Server to trust your column definitions instead of the provider’s runtime metadata.