SQL Server代理作业失败,但存储过程在打开的会话

时间:2016-10-24 14:31:57

标签: sql-server excel

希望使用excel中的数据更新表。工作错误是;

  

" Microsoft.ACE.OLEDB.12.0"对于链接服务器"(null)"报告错误。提供商没有提供有关错误的任何信息。

     

[SQLSTATE 42000](错误7399)无法初始化OLE DB提供程序的数据源对象" Microsoft.ACE.OLEDB.12.0"对于链接服务器"(null)"。

     

[SQLSTATE 42000](错误7303)。

使用开放的SSMS会话运行良好。这是存储过程;

if object_id ('MyTable') is null    
create table MyTable    
    (ForecastItem itemtype, PlanningBill int, OrderedItem itemtype)     

truncate table MyTable    

insert into MyTable 
select *      
FROM OPENROWSET('Microsoft.ACE.OLEDB.12.0',     
    'Excel 12.0;Database=\\Myserver\Public$\Forecast Generator\Forecasting Generator.xls;HDR=YES',    
    'SELECT [planning BoM], [Planning Bill #], ItemCode FROM [Planning Bill CREF$]') 

作业所有者对excel文件的位置具有域权限。

我假设存在权利问题,但一切看起来都不错。

非常感谢任何线索。

0 个答案:

没有答案
相关问题