1

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?

4

2 回答 2

0

执行此操作的唯一方法是将 DFT GUID 绑定到数据库/记录集中的名称,然后在任务失败/成功后进行查找。这并不优雅,但却是唯一的方法。请注意,如果您的对象在包上发生更改,您将不得不在数据库端重新创建关联。

于 2013-01-31T17:30:35.050 回答
0

看来您有一个 DFT,其中有多个源和相应的目标。

将每个表放在自己的 DFT 中,或者更好地放在自己的 Child 包中怎么样?然后,您可以为每个任务设置一个错误事件处理程序,或者甚至更好地使用一个通用错误处理程序子包。

于 2013-02-02T16:31:29.150 回答