需要幫助。我試圖自動化錯誤通知發送郵件。爲此,我正在查詢sysssislog表。我在包事件處理程序「On error」上粘貼了「執行SQl任務」。出於測試目的,我故意嘗試在包含主鍵列的表中加載重複鍵(以便獲取錯誤)。減少在sysssislog中記錄多個錯誤
但是,SSIS在表中記錄3,而不是隻有一個錯誤,「違反主鍵約束」。 PFA的截圖也是如此。我如何限制工具只記錄一個錯誤,而不是多個?
包裝結構。
套餐( 「在錯誤事件處理程序」) - > DFT - > OLEDB源 - > OLEDB目的地
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 statement has been terminated.". An OLE DB record is available. Source: "Microsoft SQL Server Native Client 10.0" Hresult: 0x80004005 Description: "Violation of PRIMARY KEY constraint 'PK_SalesPerson_SalesPersonID'. Cannot insert duplicate key in object 'dbo.SalesPerson'.".
SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "input "OLE DB Destination Input" (56)" failed because error code 0xC020907B occurred, and the error row disposition on "input "OLE DB Destination Input" (56)" 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 Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "OLE DB Destination" (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.
請指引我。非常感激你的幫助。
感謝
謝謝你特洛伊。雖然我已經找到了類似的解決方法,但這也給了一個新的尺度。 – Akshay
特洛伊,提到的查詢的結果是不正確的。我與日誌交叉驗證。使用前請檢查。 – Akshay