In SQL Server, there’s a “data access” setting that enables and disables a linked server for distributed query access. If you ever get the “Server is not configured for DATA ACCESS” error, it’s probably because you’re trying to run a distributed query against a linked server that isn’t configured for data access. This can also happen when you try to run OPENQUERY()
against your local server.
You can use sp_serveroption
to enable or disable data access on a given server. However, you might want to check the existing settings before you start changing them. The following examples show how to do that.