問題:
When I run a query with OPENROWSET
in SQL Server 2000 it works. 當我在SQL Server 2000中使用OPENROWSET
運行查詢時,它可以工作。
But the same query in SQL Server 2008 generates the following error: 但是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. SQL Server阻止訪問組件“Ad Hoc Distributed Queries”的STATEMENT“OpenRowset / OpenDatasource”,因爲此組件已作爲此服務器的安全配置的一部分關閉。 A system administrator can enable the use of 'Ad Hoc Distributed Queries' by using sp_configure 系統管理員可以使用sp_configure啓用“Ad Hoc Distributed Queries”