尝试在SQL Server 2008 r2 64位中打开Excel文件时出现以下错误:
Msg 7399, Level 16, State 1, Line 1
The OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)"
reported an error. The provider did not give any information about the error.
Msg 7303, Level 16, State 1, Line 1
Cannot initialize the data source object of OLE DB provider
"Microsoft.ACE.OLEDB.12.0" for linked server "(null)".
Run Code Online (Sandbox Code Playgroud)
我正在使用以下查询:
SELECT * FROM OPENROWSET('Microsoft.ACE.OLEDB.12.0', 'Excel 12.0;
HDR=NO; IMEX=1; Database=\\filepath\filename.xlsx', 'SELECT * FROM [Sheet1$]')
Run Code Online (Sandbox Code Playgroud)
有趣的是,DBA可以毫无问题地运行它.我已经完成并运行了以下查询:
sp_configure 'Show Advanced Options', 1;
RECONFIGURE;
GO …
Run Code Online (Sandbox Code Playgroud)