Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQL Server not configured for data access

People also ask

How do I enable data access in SQL Server?

Here's how to enable data access. EXEC sp_serveroption @server = 'sqlserver007', @optname = 'DATA ACCESS', @optvalue = 'TRUE';

Is not configured for data access?

The “Server is not configured for DATA ACCESS” error in SQL Server is a common error when trying to run a distributed query against a server that has its data access setting disabled. The error will have the name of the server that you're trying to access.

How do I make sure SQL Server is configured to allow remote connections?

Using SQL Server Management StudioIn Object Explorer, right-click a server and select Properties. Select the Connections node. Under Remote server connections, select or clear the Allow remote connections to this server check box.


How to: Rename a Computer that Hosts a Stand-Alone Instance of SQL Server 2005

You should be able to run this but not against any linked server. It's not a linked server. It's local.

EXEC sp_serveroption 'YourServer', 'DATA ACCESS', TRUE

Just go to the linked server properties > Server options > Data access --> true

Works on SQL Server 2014.

Regards


I just would like to add to the previous answers that, at least in my case here, I needed to enable data access in both places.

for instance:

there is server A and server B

On server A I have a linked server LB that links me from server A to server B

I need to execute the following:

-- on server A

exec sp_serveroption 'LB', 'data access', 'true'

-- on server B

exec sp_serveroption 'B', 'data access', 'true'

I've just come across this error and found that it was caused by me trying to run OpenQuery against the local server (doh!). Changing the server name to that of an actual linked server resolved my issue.


with this

use master
go

exec sp_serveroption 'server name', 'data access', 'true'
go 

linked servers generated for replication still showing same error