- Error number
- 7303
- Severity
- 16 (user-correctable error)
- State
- 1
- Product
- Microsoft SQL Server Database Engine
- Versions
- All supported SQL Server versions (2016 to 2025), Azure SQL Managed Instance (supported providers only)
- Category
- Linked Servers
- Last reviewed
- 23 October 2026
On this page
What it means
Error 7303 means SQL Server loaded the OLE DB provider for a linked server but the provider could not open its data source, such as a file, ODBC DSN or remote server, so the query never started.
Initialising the data source is the provider's "connect" step: open the Access or Excel file, find the ODBC DSN, or log in to the remote server. Error 7303 says that step failed, and it carries no reason of its own. The reason is in the provider's returned message line printed next to it (in our sqlcmd tests, straight after the 7303), and sometimes in a 7399 printed just before. Read that line first.
Everything happens on the database server, as the SQL Server service account (or as the mapped remote login), not on your workstation. A file path, DSN or network share that works on your PC can be missing or unreadable for the service. The provider must also be installed on the server in the right bitness (64-bit for a 64-bit instance).
Common causes
- The file in the linked server data source (Access database, Excel workbook, text folder) does not exist on the server, is on a mapped drive the service cannot see, or the service account cannot read it.
- The file is not the type the provider string says (for example
Excel 12.0pointing at a .csv or a corrupt workbook), or it is open exclusively by another program. - An ODBC DSN named in the linked server is missing on the server, or was created as a 32-bit or user DSN that a 64-bit service cannot see.
- The login mapping gives the SQL Server provider no usable credentials (for example a mapping with no remote user), which shows up as 7399
Authentication failedplus 7303. - The provider itself is missing, the wrong bitness or not allowed to load in process; that usually shows as a different error (7302 or 7403), so check the exact number.
Diagnose it
Read-only These queries only read metadata and dynamic management views. They do not change data, permissions or configuration, so they are safe to run first.
How is the linked server defined?
SELECT name, product, provider, data_source, location, provider_string, catalog, modify_date
FROM sys.servers
WHERE is_linked = 1; Check provider and data_source against the message: the file path or DSN must exist on the server itself. A path with a drive letter that is only mapped in your session will fail for the service.
Which credentials does the linked server use?
SELECT s.name AS linked_server, p.name AS local_login, l.uses_self_credential, l.remote_name
FROM sys.linked_logins AS l
JOIN sys.servers AS s ON s.server_id = l.server_id
LEFT JOIN sys.server_principals AS p ON p.principal_id = l.local_principal_id
WHERE s.is_linked = 1; A row with local_login NULL is the default mapping for everyone. uses_self_credential = 0 with an empty remote_name means no credentials are sent, which fails with 7399 and 7303.
Which account opens the files?
SELECT servicename, service_account
FROM sys.dm_server_services
WHERE servicename LIKE N'SQL Server (%'; File based providers open the file as this account. It needs read (and for Access usually write, for the lock file) permission on the folder in data_source.
Test the linked server on its own
EXEC master.dbo.sp_testlinkedserver N'ORDERS_ACCESS'; Completes without output when the data source opens. Otherwise you get the same 7303 with the provider message, without involving your query.
How to fix it
Each fix is labelled with what it changes. Try read-only checks and the least invasive fix first, and test changes outside production.
Fix the data source the provider message points to
Changes configurationUse a path that exists on the server (a local path or a UNC path, not a mapped drive), the correct file type in the provider string, or create the ODBC DSN as a 64-bit System DSN on the server. You can change the data source with sp_setnetname or by dropping and recreating the linked server, then retest with sp_testlinkedserver.
Give the service account access to the file and folder
Changes permissionsGrant the SQL Server service account (from the diagnostics) permission on the folder that holds the file. Access databases also need permission to create the lock file next to the database.
Caution: Grant access only to that folder and only to the service account, not to Everyone, and keep sensitive files out of folders the service can read.
Map logins with credentials the remote server accepts
Changes permissionsFor SQL Server providers, map each local login to itself (Windows authentication, which needs Kerberos delegation for a double hop) or to a dedicated remote SQL login with only the permissions the queries need.
Caution: Do not map all local logins to a sysadmin or other highly privileged remote login; everyone who can use the linked server would get those rights on the remote server.
EXEC master.dbo.sp_addlinkedsrvlogin
@rmtsrvname = N'SALESSRV01', @useself = N'False',
@locallogin = N'CONTOSO\ReportUser',
@rmtuser = N'report_reader', @rmtpassword = N'<strong password>';
Examples
A linked server to an Access file that is not there
Reproduced on SQL Server 2025 (17.0.1145.4) with a temporary linked server (Microsoft.ACE.OLEDB.16.0 provider), dropped afterwards; the linked server name and path are changed here. The provider message after the 7303 gives the reason.
-- Linked server ORDERS_ACCESS: provider Microsoft.ACE.OLEDB.16.0,
-- data source D:\Data\Orders.accdb (the file does not exist on the server)
SELECT * FROM OPENQUERY(ORDERS_ACCESS, 'SELECT 1');
Msg 7303, Level 16, State 1, Line 3 Cannot initialize the data source object of OLE DB provider "Microsoft.ACE.OLEDB.16.0" for linked server "ORDERS_ACCESS". OLE DB provider "Microsoft.ACE.OLEDB.16.0" for linked server "ORDERS_ACCESS" returned message "'D:\Data\Orders.accdb' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides.".
An ODBC linked server whose DSN does not exist
Reproduced on SQL Server 2025 (17.0.1145.4) with a temporary MSDASQL linked server, dropped afterwards; names changed.
-- Linked server ERP_ODBC: provider MSDASQL, data source ERP_DSN (no such DSN on the server)
SELECT * FROM OPENQUERY(ERP_ODBC, 'SELECT 1 AS x');
Msg 7303, Level 16, State 1, Line 2 Cannot initialize the data source object of OLE DB provider "MSDASQL" for linked server "ERP_ODBC". OLE DB provider "MSDASQL" for linked server "ERP_ODBC" returned message "[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified".
How to prevent it
Keep files that linked servers read in a fixed folder on the server or on a UNC share, with access granted to the service account, and document each linked server (provider, data source, login mapping) in the server build scripts. Run sp_testlinkedserver after every server move, driver upgrade or service account change.
For regular file loads, consider importing with SSIS, BULK INSERT or a client tool instead of a file based linked server: they are easier to secure and to troubleshoot.
Common questions
The file opens fine on my PC. Why does the linked server fail?
The provider runs inside SQL Server on the server, as the service account. Your PC, your mapped drives and your permissions do not count; the path must exist and be readable on the server.
What is the difference between 7303 and 7399?
7303 says the data source could not be opened. 7399 is the provider reporting an error, often with a short reason such as Authentication failed. They frequently appear together; read the provider text in both.
Why do I see error 53 or a certificate error instead of 7303?
With the SQL Server OLE DB driver, network and encryption failures are often passed through directly: in our tests an unreachable host showed error 53 with Login timeout expired, and an untrusted certificate showed an SSL Provider error. Fix the network path or the certificate rather than the linked server definition.
Learn more on CodeWithSQL
Official documentation
- Linked servers (Database Engine)
- sp_addlinkedserver (Transact-SQL)
- sp_addlinkedsrvlogin (Transact-SQL)
- sp_testlinkedserver (Transact-SQL)
Last technically reviewed 23 October 2026; examples and diagnostics run on SQL Server 2025 (17.0.1145.4). Message text checked against the engine's sys.messages catalogue.