【问题标题】:SSIS package runs successfully when i start my SQL server Agent job manually but it went to failure on scheduled time当我手动启动我的 SQL Server 代理作业时,SSIS 包成功运行,但它在预定时间失败
【发布时间】:2015-05-28 08:37:08
【问题描述】:

此时它会抛出如下错误消息:

留言

Executed as user: DOMAIN1\administrator. ...50.1600.1 for 32-bit  Copyright (C) Microsoft Corporation 2010. 
All rights reserved.    Started:  1:00:01 AM  Error: 2015-05-28 01:40:00.82     Code: 0xC0202009     
Source: DFT RequestFactStg OLE DB Command [3499]     Description: SSIS Error Code DTS_E_OLEDBERROR.  
An OLE DB error has occurred. Error code: 0x80040E14.  An OLE DB record is available.  Source: 
"Microsoft SQL Server Native Client 10.0"  Hresult: 0x80040E14  Description: "Uncommittable transaction is detected
at the end of the batch. The transaction is rolled back.".  An OLE DB record is available.  Source:
"Microsoft SQL Server Native Client 10.0"  Hresult: 0x80040E14  Description: "The current transaction cannot 
be committed and cannot support operations that write to the log file. Roll back the transaction.".  End Error  
Error: 2015-05-28 01:40:00.82     Code: 0xC0202009     Source: DFT RequestFactStg OLE DB Destination [3509]   
Description: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80004005.  An OLE 
DB record is available.  Source: "Microsoft SQL Server Native Client 10.0"  Hresult: 0x80004005  Description: 
"The INSERT statement conflicted with the FOREIGN KEY constraint "FK_DateDimStg_TO_RequestFactStg". The 
conflict occurred in database "ENIStageUAT", table "dbo.DateDimStg", column 'DateKey'.".  End Error  Error: 
2015-05-28 01:40:00.87     Code: 0xC0209029     Source: DFT RequestFactStg OLE DB Destination [3509]     
Description: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR.  The "input "OLE DB Destination Input" 
(3522)" failed because error code 0xC020907B occurred, and the error row disposition on "input "OLE DB 
Destination Input" (3522)" specifies failure on error. An error occurred on the specified object of the 
specified component.  There may be error messages posted before this with more information about the failure.
End Error  Error: 2015-05-28 01:40:00.87     Code: 0xC0209029     Source: DFT RequestFactStg OLE DB Command 
[3499]     Description: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR.  The "input "OLE DB Command 
Input" (3504)" failed because error code 0xC020906E occurred, and the error row disposition on "input "OLE 
DB Command Input" (3504)" specifies failure on error. An error occurred on the specified object of the 
specified component.  There may be error messages posted before this with more information about the 
failure.  End Error  Error: 2015-05-28 01:40:00.91     Code: 0xC0047022     Source: DFT RequestFactStg SSIS.
Pipeline     Description: SSIS Error Code DTS_E_PROCESSINPUTFAILED.  The ProcessInput method on component 
"OLE DB Destination" (3509) failed with error code 0xC0209029 while processing input "OLE DB Destination 
Input" (3522). The identified component returned an error from the ProcessInput method. The error is specific
to the component, but the error is fatal and will cause the Data Flow task to stop running.  There 
may be error messages posted before this with more information about the failure.  End Error  Error: 
2015-05-28 01:40:00.93     Code: 0xC0047022     Source: DFT RequestFactStg SSIS.Pipeline     Description: 
SSIS Error Code DTS_E_PROCESSINPUTFAILED.  The ProcessInput method on component "OLE DB Command" (3499) 
failed with error code 0xC0209029 while processing input "OLE DB Command Input" (3504). The identified 
component returned an error from the ProcessInput method. The error is specific to the component, but the
error is fatal and will cause the Data Flow task to stop running.  There may be error messages posted
before this with more information about the failure.  End Error  Error: 2015-05-28 01:40:01.86     Code: 
0xC02020C4     Source: DFT RequestFactStg OLE DB Source [1617]     Description: The attempt to add a row
to the Data Flow task buffer failed with error code 0xC0047020.  End Error  Error: 2015-05-28 01:40:01.90
Code: 0xC0047038     Source: DFT Reque...  The package execution fa...  The step failed.

所以请帮助我...

【问题讨论】:

  • 请正确格式化!!! INSERT 语句与 FOREIGN KEY 约束“FK_DateDimStg_TO_RequestFactStg”冲突。冲突发生在数据库“ENIStageUAT”、表“dbo.DateDimStg”、列“DateKey”中。”

标签: sql-server database ssis


【解决方案1】:

用户最常遇到的问题。在编辑作业中的步骤时,您必须在 Run as 字段中选择代理用户。

创建具有足够权限运行 SSIS 包的代理用户(例如具有 sysadmin 权限)

编辑:tutorial for creating agent proxy

编辑 2:好吧,我的错。在混乱中没有看到 conflict 错误。也许你现在只是想插入坏数据。

【讨论】:

  • 是的,它仅在代理帐户下运行(凭据共享到 sql server)在此之前还有一件事它成功运行了很多次
【解决方案2】:

“INSERT 语句与 FOREIGN KEY 约束“FK_DateDimStg_TO_RequestFactStg”冲突。 数据库中发生冲突“

这可能是个问题。

确保您使用的是相同的数据库。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-12-01
    • 2013-05-27
    • 2020-06-26
    • 1970-01-01
    • 2023-03-30
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多