Нужна помощь. Я пытаюсь автоматизировать уведомления об ошибках для отправки в почтовых программах. Для этого я запрашиваю таблицу sysssislog. Я вставил «Execute SQl task» в обработчик событий пакета «On error». В целях тестирования я намеренно пытаюсь загрузить дубликаты ключей в таблице, состоящей из столбца первичного ключа (чтобы получить ошибку).Уменьшить количество ошибок, зарегистрированных в sysssislog
Но вместо того, чтобы иметь только одну ошибку, «Нарушение ограничения первичного ключа», записи SSIS 3 в таблице. PFA - скриншот. Как я могу ограничить инструмент записью только одной ошибки, а не нескольких?
Структура упаковки.
пакет ("Об ошибке Обработчик события") -> ДПФ -> 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.
Пожалуйста, руководство меня. Ваша помощь очень ценится.
Благодаря
Спасибо, Трой. Хотя я и догадался о подобном решении, но это также дает новый dimesnion. – Akshay
Троя, результат указанного запроса неверен. Я перекрестно проверяю журналы. Пожалуйста, проверьте перед использованием. – Akshay