title: How to enable Ad Hoc Distributed Queries
body: <p>When I run a query with <code>OPENROWSET</code> in SQL Server 2000 it works.</p>
  
  <p>But the same query in SQL Server 2008 generates the following error:</p>
  
  <blockquote>
    <p>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 <strong>'Ad Hoc Distributed Queries'</strong> by using <strong>sp_configure</strong></p>
  </blockquote>