Roll back is not working

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
sid19
Participant
Posts: 64
Joined: Mon Jun 18, 2007 12:17 am
Location: kolkata

Roll back is not working

Post by sid19 »

Hi All,

We have following job design in server.


Some Processing ----> Transformer. Two out put links from transformer
1) Db2 Stage (writes into DB2 database)
2) Aggregator - It has one out put link to 2nd Db2 Stage (Writes into Iseries file)




Transaction size in both the DB2 stage is set to zero. Our job gets aborted due to access issue in Iseries file (2nd Db2 Stage). But even that Job committed the Data in Db2 database (1st Db2 stage). It didn't rollback the Data. Please explain why it is happening.

Is there any way to set the commit after the job successful completion other wise rollback?
Sid
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

The first DB2 stage gets its last row and thus closes/commits before the second one does due to the Aggregator. No, there's no way to defer commits until everything completes.
-craig

"You can never have too many knives" -- Logan Nine Fingers
greggknight
Premium Member
Premium Member
Posts: 120
Joined: Thu Oct 28, 2004 4:24 pm

Post by greggknight »

Thats a database thing.
They are two seperate processes. If all the rows in the first process completed correctly then they will commit regardless of what the second stage does.

If this cannot happen then I would load the tables in two seperate jobs.
I would then put some logic in so that if job two fails it clears out the data that job one inserted before the seq or batch does an abort.


Thats one way.
"Don't let the bull between you and the fence"

Thanks
Gregg J Knight

"Never Never Never Quit"
Winston Churchill
sid19
Participant
Posts: 64
Joined: Mon Jun 18, 2007 12:17 am
Location: kolkata

Re: Roll back is not working

Post by sid19 »

Thanks Craig/Gregg,

Splitting the job will work. Or we can use Update then insert while loading. Is there any overhead?
Sid
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

I don't see how insert/update plays any role here.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply