Вопрос

I have a project to implement custom logging in our SSIS packages. I have a Data Flow task that moves data from several tables in one database to the corresponding tables in another database. If the move of Table A from database A to database B fails, then in the OnTaskFailed event I would like to log the name of the Data Flow component to a text file because that name contains the name of the table that failed. I have tried using System::SourceName and System::TaskName, but they just give me the name of the Control Flow Task (SourceName) and the name of the Script Task itself in the event handler (TaskName).

Is there a way to get the Data Flow Component name?

Это было полезно?

Решение

The only way to do this is to tie up the DFT GUID to a name in the database/recordset and then do a lookup after your task fails/succeeds. This is not elegant, but is the only way to do it. Word of caution, if your objects change on the package, you will have to recreate the association on the database side.

Другие советы

It appears you have one DFT inside of which you have multiple Sources and corresponding destinations.

How about putting each table in its own DFT, or even better in its own Child package? You can then have an on error event handler for each of the task, or even better a common error handler child package.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top