How to transaction rollback in ssis?

2020-01-29 09:56发布

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 ?

标签: ssis
1条回答
在下西门庆
2楼-- · 2020-01-29 10:22

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

查看更多
登录 后发表回答