需要帮忙。我正在尝试自动发送邮件中的错误通知。为此,我正在查询 sysssislog 表。我在包事件处理程序“出错”上粘贴了一个“执行 SQl 任务”。出于测试目的,我故意尝试在由主键列组成的表中加载重复键(以便出错)。
但是,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.
请指导我。非常感激你的帮助。
谢谢