Ad Hoc Distributed Queries未启动 解决方法

Winder cai 2009-09-23 11:14:27
在执行openrowset/opendatasource时出的错。
SQL Server 阻止了对组件 'Ad Hoc Distributed Queries' 的 STATEMENT'OpenRowset/OpenDatasource' 的访问,因为此组件已作为此服务器安全配置的一部分而被关闭。系统管理员可以通过使用 sp_configure 启用 'Ad Hoc Distributed Queries'。开启方法如下:
EXEC sp_configure 'show advanced options', 1
GO
RECONFIGURE with override
GO
EXEC sp_configure 'Ad Hoc Distributed Queries', 1
GO
RECONFIGURE with override

如果没有加 with override是不能解决的
...全文
187 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
--小F-- 2009-09-23
  • 打赏
  • 举报
回复
学习
billpu 2009-09-23
  • 打赏
  • 举报
回复
帮顶
7761098 2009-09-23
  • 打赏
  • 举报
回复
还没注意呢,多谢
lihan6415151528 2009-09-23
  • 打赏
  • 举报
回复
感谢分享!
Office数据库升迁 Access 导入 SQL Server,相信大家都知道 SQL-Server 数据库导入导出功能吧,但当你装了精简版的SQL-Server这个功能就会没有了,也就是无法实现数据库导入导出,那么怎么办 写SQL语句? Insert into Tables SELECT * FROM OPENDATASOURCE('Microsoft.Jet.OLEDB.4.0','Data Source="E:\Access.mdb";') 显然在正常情况下这可以 但如果你看见提示 Msg 15281, Level 16, State 1, Line 1 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. For more information about enabling 'Ad Hoc Distributed Queries', see "Surface Area Configuration" in SQL Server Books Online. 这时怎么办? EXEC sp_configure 'show advanced options', 1 EXEC sp_configure 'Ad Hoc Distributed Queries', 1 结果你又被提示: Msg 15123, Level 16, State 1, Procedure sp_configure, Line 51 The configuration option 'Ad Hoc Distributed Queries' does not exist, or it may be an advanced option. 很明确这条路是走不通了,因为精简版的SQL-Server没这功能。所以你就要用的我的资源了。这里主要是通过Access自带功能(你要安装这个,暂时叫插件吧)完成数据库转换。 步骤: 1.打开Access 点击菜单栏中的--》工具 2.打开 工具栏下的--》数据库实用工具 3.选择 升迁向导(和SQL导入那里一样了 相当于数据库导出 ) 选择你的 SQL-Server 服务器地址,登陆账号和密码,同时填写 生成后的SQL-Server数据库名称,就这样简单完成了。Access到SQL-Server的转换。 Ps:当然你装的是完整版的SQL-Server, 直接可以导入导出(语句也可以的),不用这样麻烦,但如果你装的就是SQL-Server精简版那么这或许是最后的方法,同时也是对Access转SQL-Server有一个新的认识。 文件包: PRO11.MSI,A4561414.CAB,CR561401.CAB,MA561416.CAB,PA561401.CAB,SKU011.CAB,YI561401.CAB,YS561409.CAB,ZA561401.CAB, ZD561403.CAB,ZU561415.CAB,ZZ561401.CAB(office2003的) 我也是因为遇见这问题,才按这个方法成功的。希望对大家都帮助

22,209

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server 疑难问题
社区管理员
  • 疑难问题社区
  • 尘觉
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧