提示:
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.
我在SQL Server Surface Area Configuration里面把Enable OPENROWSET AND OPENDATASOURCE Suppor的选项打开了,但是还是提示这个错误...
应该怎么设置呢?

解决方案 »

  1.   

    在程序中调用存储过程启动Enable OPENROWSET AND OPENDATASOURCE就可以了,我是这么写的,不知道有没有更好的方法
      

  2.   

    应该开了还没生效吧?不然怎么还有这样的提示.楼主去查查EXEC sp_configure 'Ad Hoc Distributed Queries' 如果结果中的当前运行值是0, 说明没有开, 可以这样开
    EXEC sp_configure 'Ad Hoc Distributed Queries' 
    RECONFIGURE
      

  3.   

    都打开几天了,还是没用
    运行以后提示:the configuration option 'Ad Hoc Distributed Queries' does not exist,or it may be an advance option
    还执行了'ad hoc remote queries',也是这个提示,是不是版本有问题?