我的SSIS包中有以下数据流任务:
alt text http://img228.imageshack.us/img228/358/ssis1.png
它从外部供应商处读取一个文件,该供应商的记录中有一列“更改”,其中包含用于添加、更改和删除的A、C或D。我必须在我的SQL Server数据库中处理这些。条件拆分检查更改列的值,并将该行发送到相应的命令。这个很好用。
因为输入文件有时包含错误,所以我希望使这个过程具有事务性(其中有10个数据流任务)。
但是,如果在ssis包上启用事务,则OLE DB命令似乎会相互干扰(它们不会在同一行上操作)。我得到错误:
Error: 2010-02-02 12:21:08.39
Code: 0xC0202009
Source: name OLE DB Command 1 [58]
Description: 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: "This operation conflicts with another pend
ing operation on this transaction. The operation failed.".
End Error
Error: 2010-02-02 12:21:08.39
Code: 0xC004701A
Source: name SSIS.Pipeline
Description: component "OLE DB Command 1" (58) failed the pre-execute phase
and returned error code 0xC0202009.
End Error
Progress: 2010-02-02 12:21:08.39
我尝试过任何条件拆分的顺序以及事务设置上的所有隔离级别,但似乎都不起作用。如果我进行条件拆分,只使用其中的一个分支,它就可以正常工作。
如何着手?