I have a 32 bit Windows 7 machine. I am trying to access an excel sheet by creating linked server in SQL Server 2012. I am getting following error.
Msg 7403, Level 16, State 1, Line 1 The OLE DB provider "Microsoft.ACE.OLEDB.12.0" has not been registered.
When I checked the control panel's Programs And Features, the Microsoft Access Database Engine 2010 is available.
What need to be corrected to overcme this error?
SQL
EXEC sp_addlinkedserver
@server = 'ExcelServer2',
@srvproduct = 'Excel',
@provider = 'Microsoft.ACE.OLEDB.12.0',
@datasrc = 'D:\MyFTP\Jul19\FAILED\DCSDIM.xlsx',
@provstr = 'Excel 12.0;IMEX=1;HDR=YES;'
SELECT * FROM ExcelServer2...DCSDIM
PROVIDERS
On the server you need to install the 64bit provider from redis according to the program you will use to invoke it, in this case SQL Server which is a 64bit executable, it does not matter which provider you have installed on the local computer which is executing SSMS . Also consider that Office11 is the internal name for Office 2003, Office12 that for Office 2007 and Office14 that for Office 2010 so likely after you installed the redis package for Office 2010 you need to change your code as following:
EXEC sp_addlinkedserver
@server = 'ExcelServer2',
@srvproduct = 'Excel',
@provider = 'Microsoft.ACE.OLEDB.14.0',
@datasrc = 'D:\MyFTP\Jul19\FAILED\DCSDIM.xlsx',
@provstr = 'Excel 14.0;IMEX=1;HDR=YES;'
SELECT * FROM ExcelServer2...DCSDIM