Page 1 of 1

Rollback in DRS stage

Posted: Fri Aug 18, 2006 1:44 am
by mohanraj
hi to all

Can anyone explain me how can I do rollback in DRS stage.
My problem is like this.Suppose my source contains 100 records and my job get abort after 50 records.But I don't want these passed 50 records to be seen in my target table and my target is DRS is that possible.

Thanks in advance
Mohan

Posted: Fri Aug 18, 2006 2:07 am
by loveojha2
Set your transaction size to zero.

Posted: Fri Aug 18, 2006 3:47 am
by ameyvaidya
Or Split your job into 2 jobs:
the first does all the validations and writes the output to a sequential file
the second reads the file and loads the database.

The first job can then abort without any evil consequences.

Posted: Fri Aug 18, 2006 7:07 am
by chulett
Or just set the transaction size to zero. :wink:

That turns your load into an 'all or nothing' load and the records are only commited once at the end if the job completes without fatal errors. In other words, the job must abort for the rollback to occur. This means running the job with a very low Warning threshold or enabling the 'Treat warnings as fatal' option in the stage if available.

No evil consequences here either, if done properly.

Posted: Sat Aug 19, 2006 6:03 am
by ameyvaidya
absolutely .. i agree.. but i recall reading a comment here about it being good job design to disconnect" the transform and the load parts of a "job" (But considering my non-existent short term memory, i might be wrong :oops:).

Posted: Sat Aug 19, 2006 7:05 am
by chulett
True... your advise to 'disconnect' the two processes is perfectly valid, which I should have mentioned. Regardless, I'd still use those commit settings on the portion that does the actual database work.