How to transaction rollback in ssis?

前端 未结 1 1210
执笔经年
执笔经年 2020-12-03 17:18

I have data import to Production server. In my package cleanse raw tables before data load. If any case package failed . How to rollback raw tables data in SSIS ?

相关标签:
1条回答
  • 2020-12-03 18:11

    By using Sequence Containers (Sequence, For Loop, ForEach Loop) in SSIS, you can make use of a property called TransactionOption. This allows you to specify the transactional behaviour of the tasks in your package, and the package itself to rollback if any tasks fail.

    For example, if you stick your tasks in a Sequence Container and set TransactionOption=Required, and configure all Tasks within the Container to TransactionOption=Supported, they will all join the transaction started in the Sequence Container, and if any fail, the transaction will be rolled back.

    You can read an explanation of the TransactionOption property here and/or follow the walkthrough here to see how to implement this.

    EDIT: Another good walkthrough (with screenshots) here

    0 讨论(0)
提交回复
热议问题