2016-12-14 81 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

請嘗試這種方法,看看你會得到什麼。