2016-11-23 111 views
0

我有2008SQL Server 2008中OPENROWSET

我运行下面的编码在SQL Server中使用OPENROWSET一个问题:

SELECT * 
FROM OPENROWSET('Microsoft.ACE.OLEDB.12.0','Excel 12.0;Database=C:\Procesos\PRUEBA.xlsx', [Hoja1$]) 

而且我得到以下错误:

The OLE DB Provider 'Microsoft.ACE.OLEDB.12.0' Can not be used for distributed queries Because it is configured to run on the Simple controlled threading mode.

(El proveedor OLE DB 'Microsoft.ACE.OLEDB.12.0' no puede usarse para consultas distribuidas porque está configurado para ejecutarse en el modo de subprocesamiento controlado simple.)

回答

0

this thread on DBA.SE开始,您应该先启用此选项。

EXEC sp_configure 'show advanced options', 1; 
GO 
RECONFIGURE; 
GO 
EXEC sp_configure 'Ad Hoc Distributed Queries', 1; 
GO 
RECONFIGURE; 
GO 
+0

你好,朋友。 我已经运行过这个命令,但是我仍然得到相同的错误 –