2016-11-23 109 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

你好,朋友。 我已經運行過這個命令,但是我仍然得到相同的錯誤 –