排错-Ad Hoc Distributed Queries组件被禁用的解决办法

本文涉及的产品
云数据库 RDS SQL Server,独享型 2核4GB
简介: 排错-Ad Hoc Distributed Queries组件被禁用的解决办法

Ad Hoc Distributed Queries组件被禁用的解决办法


SQL Server阻止了对组件'Ad Hoc Distributed Queries'STATEMENT'OpenRowset/OpenDatasource'的访问,因为此组件已作为此服务器安全配置的一部分而被关闭。系统管理员可以通过使用sp_configure启用'Ad Hoc Distributed Queries'。有关启用'Ad Hoc Distributed Queries'的详细信息,请参阅SQL Server联机丛书中的"外围应用配置器"

原因:

是因为SQL ServerAd Hoc Distributed Queries组件被禁用了,这里我用的SQL Server版本是2005,只需要开启Ad Hoc Distributed Queries就可以了,方法如下:

 

1.开启Ad Hoc Distributed Queries组件,在sql查询编辑器中执行如下语句:

exec sp_configure 'show advanced options',1

reconfigure

exec sp_configure 'Ad Hoc Distributed Queries',1

reconfigure

 

2.关闭Ad Hoc Distributed Queries组件,在sql查询编辑器中执行如下语句:

exec sp_configure 'Ad Hoc Distributed Queries',0

reconfigure

exec sp_configure 'show advanced options',0

reconfigure

相关实践学习
使用SQL语句管理索引
本次实验主要介绍如何在RDS-SQLServer数据库中,使用SQL语句管理索引。
SQL Server on Linux入门教程
SQL Server数据库一直只提供Windows下的版本。2016年微软宣布推出可运行在Linux系统下的SQL Server数据库,该版本目前还是早期预览版本。本课程主要介绍SQLServer On Linux的基本知识。 相关的阿里云产品:云数据库RDS SQL Server版 RDS SQL Server不仅拥有高可用架构和任意时间点的数据恢复功能,强力支撑各种企业应用,同时也包含了微软的License费用,减少额外支出。 了解产品详情: https://www.aliyun.com/product/rds/sqlserver
目录
相关文章
|
5天前
|
监控 Java 网络安全
在 ABAP 系统启用 Git-Enabled Change and Transport System 的先决条件
在 ABAP 系统启用 Git-Enabled Change and Transport System 的先决条件
7 0
|
监控 测试技术 Windows
玩转PowerShell第三节——【SCOM Maintenance Mode】-技术&分享
玩转PowerShell第三节——【SCOM Maintenance Mode】-技术&分享
Ad Hoc Distributed Queries的启用与关闭
原文:Ad Hoc Distributed Queries的启用与关闭 启用Ad Hoc Distributed Queries: exec sp_configure 'show advanced options',1 reconfigure exec sp_configure '...
1331 0