I need to copy data from DB "source" to db "destination" should the copying fail, I need to roll back on "destination". The two connections are defined in the connection manager as OLE DB.
Here is my current attempt which is not working. I tried playing around with the in-built transaction managemen (setting the tasks transaction to required) but that only made it impossible to connect to "destination".
The destination has set "RetainSameConnection" = true, while this is false for "source" for no particular reason.
I also set the "MaxConcurrentExecutables" = 1 in to hinder SSIS from executing my rollback as the first thing.
Each of the tasks in the sequence is set to "Isolation level"=ReadUncommitted and "transactionOption"=supported.
The "failing script" is a script that always fail in order for me to test the transaction is working.
The code for the task "begin tran" is "BEGIN TRANSACTION " and the connection is set to "destination"
The Code for the task "rollback tran" is "rollback transaction" and the connection is set to "destination"
The rollback fails with "the rollback transaction request has no corresponding 'BEGIN TRANSACTION'"