Today, the unit of an ASP, there is a function is exported data, found an export error, error content is: SQL Server blocked the component'Ad Hoc Distributed Queries'The STATEMENT'Openrowset/opendatasource'Access, because this component has been shut down as part of this server's security configuration. System administrators can enable by using sp_configure'Ad Hoc Distributed Queries'。 About enabling'Ad Hoc Distributed Queries'For more information, see "Surface area Configurator" in SQL Server Books Online. See the error prompt to know that SQL Server's ad HocDistributedThe queries component is disabled, the SQL Server version I used here is 2005, only need to open ad HocDistributedqueries, here's how it works:1. Turn on AD HocDistributedqueries component, execute the following statement in the SQL Query Editor:execsp_configure'Show advanced Options',1Reconfigureexecsp_configure'Ad Hoc Distributed Queries',1Reconfigure
2. Close AD HocDistributedqueries component, execute the following statement in the SQL Query Editor:execsp_configure'Ad Hoc Distributed Queries',0Reconfigureexecsp_configure'Show advanced Options',0Reconfigure
Workaround for SQL Server blocking access to component ' Ad Hoc distributed Queries ' STATEMENT ' Openrowset/opendatasource '