Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Operating System does not recognize installed OLE DB provider

I have a 32 bit Windows 7 machine.

I am trying to access an excel sheet by creating a linked server in SQL Server 2012.

Below is my error.

Msg 7403, Level 16, State 1, Line 1 The OLE DB provider "Microsoft.ACE.OLEDB.12.0" has not been registered.

The control panel's Programs And Features say the Microsoft Access Database Engine 2010 is available.

How do I solve this issue?

SQL CONNECTION STRING and a QUERY:

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:

Image shows SQL Providers on a Windows-based machine.

like image 871
LCJ Avatar asked Jul 22 '13 14:07

LCJ


People also ask

How do I set up a OLE DB provider?

The recommended way to create an OLE DB provider is to use the wizards to create an ATL COM project and a provider and then modify the files using the OLE DB templates. As you customize your provider, you can comment out unwanted properties and add optional interfaces.


1 Answers

Install the 64 - bit provider on the server from redis.

Use the above-mentioned provider to invoke the SQL Server which is a 64 - bit executable.

It does not matter what provider you have on the local computer to execute SSMS.

Office11 is the internal name for Office 2003.

Office12 for Office 2007, and Office14 for Office 2010

After you installed the redis package for Office 2010 you need to change your code as follows:

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
like image 138
A. Lion Avatar answered Oct 07 '22 06:10

A. Lion