7399 SQL Origin: Data OSI layer 7 · Application Last updated 18 Nov 2026

SQL Server Msg 7399: OLE DB provider reported an error — linked server query failed

A query to a linked server failed because the provider couldn't connect, authenticate or run it.

Exact message you may see OLE DB provider reported an errorCannot initialize the data source object of OLE DB providerThe OLE DB provider "SQLNCLI11" for linked server returned message
Seen on: SQL Server Windows

Meaning

Test the linked server (EXEC sp_testlinkedserver), check login mappings, firewall/port, the provider (MSOLEDBSQL, ACE), RPC/RPC Out settings and that the remote object exists. "Cannot initialize the data source object" usually means a provider or credentials problem.

Common causes

  • Login mapping missing or wrong password
  • Remote server unreachable/firewalled
  • Provider not installed or 32/64-bit mismatch
  • RPC Out disabled
  • Remote object name wrong

⚡ Quick fix

  1. EXEC sp_testlinkedserver 'LS'
  2. Fix the login mapping and provider
  3. Enable RPC / RPC Out for stored procedures

Detailed fix by platform

SQL

  1. sql
    EXEC sp_testlinkedserver N'REMOTE1';
    EXEC sp_serveroption 'REMOTE1', 'rpc out', 'true';

How to diagnose

  1. Test — Passes?
  2. Mapping — Valid?
  3. Provider — Installed?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Data. Errors that are often confused with or caused by this one (click to open):

15281 — SQL Server Msg 15281: SQL Server blocked access to procedure 'sys.xp_cmdshell' (component 'xp_cmdshell' turned off) (SQL)1528118456 — SQL Server: Login failed for user 'x'. (Error 18456) (SQL)18456209 — SQL Server Msg 209: Ambiguous column name (SQL)209229 — SQL Server Msg 229: The SELECT permission was denied on the object (SQL)22940 — SQL Server Error 40: Could not open a connection to SQL Server (Named Pipes Provider) (SQL)404060 — SQL Server Error 4060: Cannot open database requested by the login. The login failed (SQL)40605123 — SQL Server Msg 5123: CREATE FILE encountered operating system error 5 (Access is denied) while attempting to open the physical file (SQL)5123515 — SQL Server Msg 515: Cannot insert the value NULL into column 'X', table 'Y'; column does not allow nulls (SQL)5157399

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.