2016-12-14 56 views
1

我有一个问题... 我有一个OLE DB错误发生在INSERT语句中,而不是与FOREIGN KEY约束冲突。 SSIS包E打开这3个错误:SSIS OLE目标多个错误输出

[OLE_DEST PollOptionUserResult [43]] Error: 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 11.0" Hresult: 0x80004005 Description: "The statement has been terminated.". An OLE DB record is available. Source: "Microsoft SQL Server Native Client 11.0" Hresult: 0x80004005 Description: "The INSERT statement conflicted with the FOREIGN KEY constraint "FK_PollOptionUserResult_PollUserResult". The conflict occurred in database "dw_ismsES", table "ten.PollUserResult", column 'PollUserResultID'.".

[OLE_DEST PollOptionUserResult [43]] Error: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "OLE_DEST PollOptionUserResult.Inputs[OLE DB Destination Input]" failed because error code 0xC020907B occurred, and the error row disposition on "OLE_DEST PollOptionUserResult.Inputs[OLE DB Destination Input]" 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.

[SSIS.Pipeline] Error: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "OLE_DEST PollOptionUserResult" (43) failed with error code 0xC0209029 while processing input "OLE DB Destination Input" (56). 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.

当我尝试重定向错误我error_table,它在内部因某种原因采取的最后一个,没有第一个我所需要的。

我该如何强制它采取第一个错误?

+0

您使用什么组件/代码来重定向错误? –

+0

你能发布你的错误配置的图片吗? –

+0

您可以将错误逻辑放入错误事件中。所以每次创建错误时都会记录到您的error_table。 – rafaelbattesti

回答

0

在我的情况(SSIS 2008年),我在封装级创建的OnError事件,所以在封装发生的每个错误将被记录,不管它们发生在何处。当我采用这种方法时,所有3个错误应该记录在我的错误表中。即

enter image description here

请尝试这种方法,看看你会得到什么。