0
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$]')
Rob
  • 147
  • 1
  • 5
  • 17

1 Answers1

1

This is probably a file permissions error. Make sure that the Agent account has access to the file in question, or run the job as a different user that has access to that file.

Katherine Villyard
  • 18,550
  • 4
  • 37
  • 59