sql - 如何启用即席分布式查询

标签 sql sql-server-2008

当我在 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/

相关文章:

sql - 根据前一行数据自动计算sql表中的列

sql - 使用 SQL Server 2008 INSERT 大量记录

java - 在 MySQL 和/或 java 中将明文密码转换为 bcrypt

MYSQL 转换数据

mysql - SQL SELECT 语句表达式值重用于其他表达式

sql-server-2008 - #temporary table Microsoft SQL 似乎迷路了

sql - Oracle SQL session 的生命周期是什么?

c# - 通过 TCP/IP 而非 NP 连接到 SQL 服务器

sql - 如何在 SQL 中选择一个月的第一天?

sql-server-2008 - 删除和重新创建索引可以加速 SQL 删除吗?