【问题标题】:SSIS Package is executing successfully, While job with same package is failingSSIS 包正在成功执行,而具有相同包的作业失败
【发布时间】:2015-04-06 12:25:36
【问题描述】:

我已经为滴答系统创建了一个 SSIS 包。它将数据从 Excel 加载到暂存表,然后再加载到生产表。
打包步骤如下:
1. 截断临时表。
2.加载excel到临时表。
3. 调用一个负责数据转换以及从 staging 到 prod 表的数据加载的过程。

我已经在 SQL Server 集成服务上导入了包。
包正在成功执行。但是,当我使用包运行作业时,出现以下错误。

Source: TicketWeeklyLoad Connection manager "Ticket Weekly Sheet 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 JET Database Engine"  
Hresult: 0x80004005  Description: "The Microsoft Jet database engine cannot open the file 'C:\Users\MyUser\Desktop\CMS\DATA\SSIS\File.xls'.  
It is already opened exclusively by another user, or you need permission to view its data.".  
End Error  Error: 2015-04-06 16:46:53.40     Code: 0xC020801C     
Source: Load Weekly Excel to Tct_Stg Ticket Weekly Source Excel Sheet [103]     
Description: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER.  
The AcquireConnection method call to the connection manager "Ticket Weekly Sheet 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: 2015-04-06 16:46:53.40     Code: 0xC0047017     Source: Load Weekly Excel to Ticket_Stg SSIS.Pipeline    
 Description: Ticket Weekly Source Excel Sheet failed validation and returned error code 0xC020801C.  
End Error  Error: 2015-04-06 16:46:53.40     Code: 0xC004700C     Source: Load Weekly Excel to Ticket_Stg SSIS.Pipeline    
 Description: One or more component failed validation.  End Error  Error: 2015-04-06 16:46:53.40     
Code: 0xC0024107     Source: Load Weekly Excel to Ticket_Stg     
 Description: There were errors during task validation.  End Error  DTExec: The package execution returned DTSER_FAILURE (1).  
Started:  4:46:53 PM  Finished: 4:46:53 PM  Elapsed:  0.313 seconds.  The package execution failed.  The step failed.


此外,将 Run64BitRuntime 设置为 false 并且包还使用 32 位运行时,我使用包属性中的执行选项选项卡设置。
文件已关闭,我确实有权打开它。
我正在为 SSIS 使用 Windows 8、SQL Server 2014 和 Visual Stdio 2010。
任何建议都会很有帮助。

【问题讨论】:

  • SQL Server 是在您的计算机上运行还是在另一台计算机上运行?什么是 SQL 代理服务帐户? 可能有权打开它,但 SQL Server 代理服务帐户可能没有
  • 我正在使用 Windows 身份验证连接到本地服务器。
  • 最可能的问题是运行 SQL Server 代理作业的帐户没有访问文件的权限。
  • 我有一个帐户用于登录我的系统以及连接到 SQL Server。如果我犯了一些错误,请告诉我。
  • 使用 this 确定您的代理作业在哪个帐户下运行

标签: sql-server excel ssis package jobs


【解决方案1】:

作业失败,因为 网络服务 在 SQL Server 代理中设置为 内置 帐户。
但是 Excel 文件在我的本地系统上。
一旦我选择 本地系统 作为 内置 帐户作业成功运行。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2023-03-30
    • 1970-01-01
    • 2019-03-30
    • 2016-08-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多