当我在 SQL Server 2000 中使用 OPENROWSET
运行查询时,它可以工作。
但是 SQL Server 2008 中的相同查询会生成以下错误:
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
最佳答案
下面的命令可能会帮助你..
EXEC sp_configure 'show advanced options', 1
RECONFIGURE
GO
EXEC sp_configure 'ad hoc distributed queries', 1
RECONFIGURE
GO
关于sql - 如何启用即席分布式查询,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14544221/