• Register
Welcome to Kodlogs, programming questions and answer website.
+1 vote
180 views
cannot create an instance of ole db provider "microsoft.ace.oledb.12.0" for linked server "(null)".
by (330 points)  

2 Answers

+1 vote

Issue:

My query is as following in which i am tryig to exprot dater from sql statement to csv file. Does any one has any clue what am i doing wrong?

Error is: cannot create an instance of ole db provider "microsoft.ace.oledb.12.0" for linked server "(null)".

SQL statement which is throwing this error is:

insert into OPENROWSET('Microsoft.Jet.OLEDB.4.0',

'Excel 8.0;Database=C:\Dev\Test.xls;',

'SELECT * FROM [SheetNames$]')

select * from Company

Solutions:

>Install Microsoft.ACE.OLEDB.12.0 for Windows, 64 bit version  on your server.

>Check if you have access to C:\Windows\ServiceProfiles\LocalService\AppData\Local\Temp

>Allow'Ad Hoc Distributed Queries' to be enabled 

>SP_CONFIGURE should be as following:

sp_configure 'show advanced options', 1;
GO
RECONFIGURE;
GO
sp_configure 'Ad Hoc Distributed Queries', 1;
GO
RECONFIGURE;
GO

Read following links which might be helpful:

https://www.sqlservercentral.com/forums/topic/cannot-create-an-instance-of-ole-db-provider-microsoft-ace-oledb-12-0-for-linked-server-null

https://stackoverflow.com/questions/36987636/cannot-create-an-instance-of-ole-db-provider-microsoft-jet-oledb-4-0-for-linked

by (1.4k points)  
+1 vote
by (1.4k points)  
...