When I run a query with OPENROWSET in SQL Server 2000 it works.
But the same query in SQL Server 2008 generates the following error:
SQL Server blocked access to STATEMENT 'OpenRowset/OpenDatasource' of component 'Ad Hoc Distributed Queries' because this component is turned off as part of the security configuration for this server. A system administrator can enable the use of 'Ad Hoc Distributed Queries' by using sp_configure
i try to run
EXEC sp_configure 'show advanced options', 1 RECONFIGURE GO EXEC sp_configure 'ad hoc distributed queries', 1 RECONFIGURE GO
But any attempt to run
RECONFIGURE gives the error:
Msg 5808, Level 16, State 1, Line 1 Ad hoc update to system catalogs is not supported.
How do i enable Ad Hoc Distributed Queries in SQL Server 2008 R2?
Note: Microsoft SQL Server 2008 R2 (SP1) - 10.50.2550.0 (X64) Jun 11 2012 16:41:53 Copyright (c) Microsoft Corporation Standard Edition (64-bit) on Windows NT 6.1 (Build 7601: Service Pack 1) (Hypervisor)