- Error number
- 7411
- 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
- Category
- Linked Servers
- Last reviewed
- 24 October 2026
On this page
What it means
Error 7411 means a linked server option blocks what you asked for: "RPC" means rpc out is off, so you cannot run EXEC ... AT or call a remote procedure, and "DATA ACCESS" means the linked server is not enabled for distributed queries.
Every linked server in sys.servers carries switches that SQL Server checks before it even loads the provider. The last word of the message tells you which one failed. RPC is the rpc out option (column is_rpc_out_enabled), needed for EXEC (...) AT server and for calling a procedure by a four-part name. DATA ACCESS is the data access option (is_data_access_enabled), needed for OPENQUERY and four-part SELECT, INSERT, UPDATE and DELETE.
The RPC form surprises people most: a linked server created with sp_addlinkedserver has rpc out switched off (we saw is_rpc_out_enabled = 0 on SQL Server 2025), so the first EXEC ... AT against a new linked server fails even though queries through it work. Because the check is local, the remote server, its logins and the network play no part: the fix is on this server only.
Common causes
- The linked server was created with defaults and
rpc outwas never enabled, then a script usedEXEC (...) ATor a remote procedure call. - Someone set
data accessto false, for example to stop ad hoc queries through a linked server that should only run procedures. - The linked server was scripted from another server without its
sp_serveroptioncalls, so the options differ between environments. - The name in the query points at the local server entry or an old remote server entry (not a linked server), which has data access off.
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.
Which options does each linked server have?
SELECT name, product, provider, data_source,
is_data_access_enabled, is_rpc_out_enabled, is_remote_login_enabled
FROM sys.servers
WHERE server_id > 0
ORDER BY name; Find the server named in the message. is_rpc_out_enabled = 0 explains the RPC form; is_data_access_enabled = 0 explains DATA ACCESS. is_remote_login_enabled is the old rpc option for incoming calls and does not affect this error.
Is the name the local server entry?
SELECT server_id, name, is_linked, is_data_access_enabled
FROM sys.servers
WHERE server_id = 0; Row 0 is this instance itself. If the name in the message is this row, the query is pointing at the local server, not at a linked server.
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.
Enable rpc out on that linked server (for the RPC form)
Changes configurationIf EXEC ... AT or remote procedure calls are meant to work through this linked server, switch on rpc out for it. The change applies to this linked server only and takes effect immediately.
Caution: rpc out lets anyone who can use the linked server run any statement the mapped remote login is allowed to run on the remote server. Check the login mapping first.
EXEC master.dbo.sp_serveroption
@server = N'SALESSRV01', @optname = N'rpc out', @optvalue = N'true';
Enable data access on that linked server (for the DATA ACCESS form)
Changes configurationIf the linked server should answer distributed queries, switch data access back on. Ask first why it was turned off: it may be deliberate.
EXEC master.dbo.sp_serveroption
@server = N'SALESSRV01', @optname = N'data access', @optvalue = N'true';
Use the access path that is enabled
Client or network sideIf you may not change the options, use what is allowed: with only data access on, read through OPENQUERY instead of EXEC ... AT; with only rpc out on, call a remote procedure that returns the rows you need.
Examples
EXEC ... AT against a new linked server (rpc out is off by default)
-- A throwaway linked server that points back at this instance
EXEC master.dbo.sp_addlinkedserver @server = N'cws_errlab_ls', @srvproduct = N'',
@provider = N'MSOLEDBSQL', @datasrc = N'localhost';
GO
EXEC (N'SELECT 1 AS x') AT cws_errlab_ls;
GO
EXEC master.dbo.sp_dropserver @server = N'cws_errlab_ls', @droplogins = 'droplogins';
Msg 7411, Level 16, State 1, Line 1 Server 'cws_errlab_ls' is not configured for RPC.
Reproduced on SQL Server 2025 (17.0.1145.4), 23 October 2026.
OPENQUERY when data access is switched off
EXEC master.dbo.sp_addlinkedserver @server = N'cws_errlab_ls', @srvproduct = N'',
@provider = N'MSOLEDBSQL', @datasrc = N'localhost';
EXEC master.dbo.sp_serveroption @server = N'cws_errlab_ls',
@optname = N'data access', @optvalue = N'false';
GO
SELECT * FROM OPENQUERY(cws_errlab_ls, 'SELECT 1 AS x');
GO
EXEC master.dbo.sp_dropserver @server = N'cws_errlab_ls', @droplogins = 'droplogins';
Msg 7411, Level 16, State 1, Line 1 Server 'cws_errlab_ls' is not configured for DATA ACCESS.
Reproduced on SQL Server 2025 (17.0.1145.4), 23 October 2026.
How to prevent it
Create linked servers from a script that sets every option explicitly (data access, rpc out, timeouts) together with the login mapping, and keep it in source control so each environment gets the same definition. Enable rpc out only on linked servers that really need remote execution.
After creating or changing a linked server, test both paths you rely on (OPENQUERY and EXEC ... AT) before handing it to applications.
Common questions
What is the difference between the rpc and rpc out options?
rpc out allows this server to send remote procedure calls and EXEC ... AT to the linked server, and it is the one this error needs. rpc (is_remote_login_enabled) is about incoming calls from old-style remote servers and does not fix 7411.
Do I need to restart SQL Server after sp_serveroption?
No. The option is stored in sys.servers and the next statement that uses the linked server sees it.
Why do SELECT queries work but EXEC ... AT fails?
They are controlled by different options. Queries need data access, which is on by default; EXEC ... AT needs rpc out, which is off by default on a new linked server.
Learn more on CodeWithSQL
Official documentation
- sp_serveroption (Transact-SQL)
- EXECUTE (Transact-SQL): AT linked_server_name
- sys.servers (Transact-SQL)
- Database Engine events and errors 7000 to 7999
Last technically reviewed 24 October 2026; examples and diagnostics run on SQL Server 2025 (17.0.1145.4). Message text checked against the engine's sys.messages catalogue.