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.
When I run the stored procedure manually to import file from the D:\ drive it works. When I run the job, to trigger the stored procedure I get the error above.
This is the part of the query which fails:
Select *
from OPENROWSET('Microsoft.ACE.OLEDB.12.0'
, 'Excel 12.0;Database=D:\Folder\f.xls;HDR=YES'
, 'SELECT a, b, c, [d afd# Mgr] FROM [k a$]')