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

Why This Error Happens

Error 7376 occurs when SQL Server 2025’s query optimizer cannot push a specified join hint (such as REMOTE, LOOP, HASH, or MERGE) down to a linked server for execution. This typically happens because the OLE DB provider for the remote data source does not support the requested join operation, or because the query references tables from multiple different linked servers simultaneously, making a single remote join impossible. Additionally, outdated or misconfigured linked server providers on Windows Server 2025 can strip the capability flags required to negotiate remote joins.

Step-by-Step Resolution Guide

Step 1: Verify the Linked Server Configuration

  • Open SQL Server Management Studio (SSMS) and navigate to Server Objects > Linked Servers.
  • Right-click the relevant linked server and select Properties to confirm the Provider (e.g., MSOLEDBSQL19 or newer) is correctly installed on C:\Program Files\Microsoft SQL Server\MSSQL16.MSSQLSERVER\MSSQL\Binn\.
  • Run EXEC sp_linkedservers; to confirm the server is listed and reachable.

Step 2: Check Provider Capabilities for Remote Joins

  • Run the following query to inspect provider options:
  EXEC sp_serveroption 'YourLinkedServerName', 'collation compatible', 'true';
  EXEC sp_serveroption 'YourLinkedServerName', 'rpc', 'true';
  EXEC sp_serveroption 'YourLinkedServerName', 'rpc out', 'true';
  • Ensure “Collation Compatible” and “Use Remote Collation” are enabled, as mismatched collations often block remote join pushdown.

Step 3: Rewrite the Query to Remove Unsupported Hints

  • Remove the explicit OPTION (REMOTE JOIN HINT) or LOOP/HASH/MERGE JOIN hint from the T-SQL statement.
  • Replace cross-server joins with OPENQUERY('YourLinkedServerName', 'SELECT ...') syntax to force the join logic to execute locally on the remote instance instead of being pushed by the optimizer.
  • Example:
  SELECT * FROM OPENQUERY(YourLinkedServerName, 'SELECT ID, Name FROM dbo.Customers') AS RemoteData
  JOIN LocalTable ON RemoteData.ID = LocalTable.ID;

Step 4: Update the OLE DB Driver and Restart Services

  • Download and install the latest Microsoft OLE DB Driver for SQL Server compatible with Windows Server 2025.
  • Restart the SQL Server (MSSQLSERVER) service via services.msc or by running:
  Restart-Service -Name 'MSSQLSERVER' -Force
  • This clears any cached execution plans referencing the old provider capabilities.

Alternative or Verification Steps

  • Re-run the original query without the join hint and check the Actual Execution Plan in SSMS to confirm the join is now resolving locally or being remotely pushed without error 7376.
  • If the error persists, use sp_testlinkedserver 'YourLinkedServerName' to validate connectivity, and consider migrating the query logic into a stored procedure on the remote server to bypass cross-server join hint limitations entirely.