TransactionOption in SSIS

后端 未结 3 743
孤城傲影
孤城傲影 2020-12-04 03:17

I have created a SSIS package. I need to apply Transaction to this package for rollbacking in case the package fails. What I found is a property \"TransactionOption\" which

3条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-04 04:03

    enter image description here

    1. Create 2 "OLE DB Connection managers" both connecting to the same database. On the properties of one of the "OLE DB Connection managers" set the 'RetainSameConnection' property to true.
    2. Then create 3 "Execute SQL Task" and connect them with the "OLE DB Connection managers" were the 'RetainSameConnection' property is set to true.
    3. Add the following statements on there respective Execute SQL task

      • BEGIN TRANSACTION
      • COMMIT TRANSACTION
      • ROLLBACK TRANSACTION

提交回复
热议问题