SQL Server 阻止 \'Ad Hoc Distributed Queries\' ?

数据库 SQL Server
以下的文章主要描述的是SQL Server 阻止对组件 \'Ad Hoc Distributed Queries\' 的错误访问,以下就是文章的主要内容讲述。

以下的文章主要描述的是SQL Server 阻止对组件 \'Ad Hoc Distributed Queries\' 的错误访问,在实际操作中如果你想用openrowset 来对远程数据库进行查询,其结果提示SQL Server 阻止了对组件 \'Ad Hoc Distributed Queries\' 的访问错误,在网上搜索了一下,找到解决方法:?

 

启用Ad Hoc Distributed Queries:

  1. exec sp_configure 'show advanced options',1   
  2. reconfigure   
  3. exec sp_configure 'Ad Hoc Distributed Queries',1   
  4. reconfigure  

 

使用完成后,关闭Ad Hoc Distributed Queries:

 

  1. exec sp_configure 'Ad Hoc Distributed Queries',0   
  2. reconfigure   
  3. exec sp_configure 'show advanced options',0   
  4. reconfigure   
  5. SELECT *   
  6. FROM OPENDATASOURCE(   
  7. 'SQLOLEDB',   
  8. 'Data Source=ServerName;User ID=sa;Password=sa'   
  9. ).DataBaseName.dbo.Table   
  10. select * from openrowset( 'SQLOLEDB ', 'IP地址'; '用户名'; '密码',数据库名.dbo.表名)   

 

以上的相关内容就是对SQL Server 阻止了对组件 \'Ad Hoc Distributed Queries\' 的访问错误的介绍,望你能有所收获。

 


上述的相关内容就是对SQL Server 阻止了对组件 \'Ad Hoc Distributed Queries\' 的访问错误的描述,希望会给你带来一些帮助在此方面。

【编辑推荐】

  1. SQL Server 2005缺失索引的找回方案
  2. SQL Server XML 入门的18句话
  3. SQL Server附加数据库出错的破解方案
  4. SQL Server 2005报告服务架构的正确剖析
  5. SQL Server拆分字符串的3常用种方法
责任编辑:佚名 来源: 清华大学出版社
相关推荐

2011-08-11 14:53:21

Ad Hoc DistSQL Server数

2010-06-17 17:16:29

Ad Hoc路由协议

2011-08-03 10:30:15

Linuxad-hocWifi

2009-11-18 09:33:24

2010-06-17 17:27:35

路由协议

2010-08-13 09:25:52

路由协议AODV

2010-03-18 16:20:53

2010-06-19 14:03:20

2010-03-18 16:08:53

无线Ad-hoc网络

2010-03-18 16:28:24

无线Ad-hoc网络

2010-03-18 16:54:14

无线Ad-hoc网络

2012-04-26 13:48:56

iPhone应用发布Ad Hoc

2010-03-18 16:39:49

2011-08-17 13:48:50

无线局域网

2011-10-24 15:31:17

2011-08-30 16:34:51

SQL Server 阻止保存要求重新创建表

2010-08-13 15:31:47

Exchange Se

2009-06-29 10:18:01

Windows Ser操作系统AD

2013-03-28 10:05:17

Windows SerAD虚拟化虚拟化安全

2010-07-23 12:55:29

SQL Server
点赞
收藏

51CTO技术栈公众号