I've been tasked with getting an installation of SQL Server 2016 working running on a Windows Server 2016 using the Microsoft.ACE.OLEDB.12.0 driver to access Excel files. This is a pretty standard issue, and I'm familiar with the normal problems with the setup, but I can't figure out why the driver isn't working. As everything is 64 bit I've downloaded the 64 bit version of the driver from Microsoft [url=https://www.microsoft.com/en-us/download/details.aspx?id=13255]here[/url], I've reserved what is historically the appropriate amount of memory by adding the "-g512" to the server's Startup Parameters, I've set the "Ad Hoc Distributed Queries" option, set the "Microsoft.ACE.OLEDB.12.0" provider's "AllowInProcess" and "DynamicParameters" properties, restarted SQL Server and the OS, and even made sure the Temp folders for both Local and Network had appropriate permissions (even though it's not required for the 64 bit driver), and when I run this test query: [code="sql"]SELECT * FROM OPENROWSET('Microsoft.ACE.OLEDB.12.0', 'Excel 12.0;Database=C:\TestList.xlsx', 'SELECT * FROM [Sheet1$]')[/code]I get this error:[code="sql"]OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)" returned message "Unspecified error".Msg 7303, Level 16, State 1, Line 44Cannot initialize the data source object of OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)".[/code]This error used to mean SQL Server couldn't access something, such as the Temp folder or the driver, or perhaps the source file, but I have verified the driver can be found under the Linked Servers-Providers, and the Temp folder and source file are both accessible.At this point, I think I need assistance to figure this out. Any ideas?After posting this, I decided to throw the Profiler on this, and get a look under the covers to see what the "Unspecified Error" was. After setting up the trace, I found the initialization (IID_IDBInitialize) event is kicking out a 0x80004002 (aka E_NOINTERFACE) error code; that code is being converted to a 0x80004005 (aka DTS_E_OLEDBERROR), which translates to the "Unspecified Error".I'm still confounded by this issue.
↧