sql - 作为作业运行时,SSIS 包从 Excel 加载数据失败

标签 sql sql-server excel visual-studio ssis

我使用 Visual Studio 2015 创建了一个 SSIS 包,它采用 Excel 文件并将其导入数据库。这项工作已经顺利进行了数周,但由于某种原因,今天早上失败了。当我将它作为自己的包运行时,它运行得很好,但是每当它在作业中时,即使它是作业中的唯一步骤,它也会失败。它使用 32 位运行时运行。我收到的错误粘贴在下面。

Executed as user: NA\SQL_INTDB01$. Microsoft (R) SQL Server Execute Package 
Utility  Version 13.0.1601.5 for 32-bit  Copyright (C) 2016 Microsoft. All 
rights reserved.    Started:  9:41:48 AM  Error: 2018-01-04 09:41:49.36     
Code: 0xC0202009     Source: STRATImport Connection manager "Excel 
Connection Manager"     Description: SSIS Error Code DTS_E_OLEDBERROR.  An 
OLE DB error has occurred. Error code: 0x80004005.  An OLE DB record is 
available.  Source: "Microsoft Access Database Engine"  Hresult: 0x80004005  
Description: "Failure creating file.".  End Error  Error: 2018-01-04 
09:41:49.36     Code: 0xC020801C     Source: Data Flow Task 1 Excel Source 
[71]          Description: SSIS Error Code 
DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER.  The AcquireConnection 
method call to the connection manager "Excel Connection Manager" failed with 
error code 0xC0202009.  There may be error messages posted before this with 
more information on why the AcquireConnection method call failed.  End Error  
Error: 2018-01-04 09:41:49.36     Code: 0xC0047017     Source: Data Flow 
Task 1 SSIS.Pipeline     Description: Excel Source failed validation and 
returned error code 0xC020801C.  End Error  Error: 2018-01-04 09:41:49.36     
Code: 0xC004700C     Source: Data Flow Task 1 SSIS.Pipeline     Description: 
One or more component failed validation.  End Error  Error: 2018-01-04 
09:41:49.36     Code: 0xC0024107     Source: Data Flow Task 1      
Description: There were errors during task validation.  End Error  DTExec: 
The package execution returned DTSER_FAILURE (1).  Started:  9:41:48 AM  
Finished: 9:41:49 AM  Elapsed:  0.438 seconds.  The package execution 
failed.  The step failed.

最佳答案

Microsoft Access 数据库引擎引发以下错误:

Failure creating file

当 Excel 连接管理器无法访问所选路径时,会引发此错误,原因可能是:

  1. 您正在使用网络路径/尝试替换为本地路径
  2. 它可能指向您的本地服务器,但是当它部署到另一台服务器时,它会抛出错误
  3. 您无权从运行 SSIS 的帐户访问所选路径
  4. 路径不存在

引用文献

关于sql - 作为作业运行时,SSIS 包从 Excel 加载数据失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48097983/

相关文章:

php - 如何使用真实的 $row ['username' ] 构建此查询?

Mysql 排序依据与分组

java - 如何使用Java在Excel中输入无效的公式

sql - mysql - 排序和左外连接问题

sql - 查找序列词 SQL

sql-server - SSRS : filter parameter passed to sub-report

sql - 使用 last_value+over 的大型 sql 表

sql - 不使用 ROW_NUMBER() 函数删除重复记录

excel - 在单独的工作表中显示表格的一部分

excel - 只要 Excel 工作簿处于打开状态,有没有办法声明和使用 VBA 变量?