Hi,
I have the following SQL working perfectly in SSMS 2012 - 64 Bit.
INSERT INTO OPENROWSET('Microsoft.ACE.OLEDB.12.0', 'Excel 12.0; Database=C:\Temp\Results.xls', 'SELECT X, Y FROM [Sheet1$]') SELECT X, Y FROM #tmp
I have created the job for this. And when i ran that job, i have got the following error:
Executed as user: NT SERVICE\SQLSERVERAGENT. Cannot initialize the data source object of OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)". [SQLSTATE 42000] (Error 7303) OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)" returned message "Unspecified error". [SQLSTATE 01000] (Error 7412). The step failed.
I tried these two but no luck:
EXEC master.dbo.sp_MSset_oledb_prop N'Microsoft.ACE.OLEDB.12.0' , N'AllowInProcess' , 1
GO
EXEC master.dbo.sp_MSset_oledb_prop N'Microsoft.ACE.OLEDB.12.0' , N'DynamicParameters' , 1
GO
Any help ?
Thanks