Executing everything in one transaction

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
nick.bond
Charter Member
Charter Member
Posts: 230
Joined: Thu Jan 15, 2004 12:00 pm
Location: London

Post by nick.bond »

I would also go along the lines of stored procedure for this one. You're not doing anything with the data so there's no real advantage of using datastage, it's just a step that needs to be executed. The database is better suited to performing this operation and you should get more control over rolling it back as one transaction.
Regards,

Nick.
Gautam19
Participant
Posts: 7
Joined: Fri Aug 26, 2005 12:24 am
Location: India

Post by Gautam19 »

Yes, the only thing is, since we already have an existing code using DS in place, I was hoping if we could have twisted or tweaked something to achieve what we wanted, rather than re-doing everything.
Gautam Handa
nick.bond
Charter Member
Charter Member
Posts: 230
Joined: Thu Jan 15, 2004 12:00 pm
Location: London

Post by nick.bond »

If it was Oracle you could use Transaction grouping so that all the delete statements could be rolled back together. Unfortunately I don't know much about the Informix stage, the only thing I could recommend to make it work would be to make sure your link ordering is correct for the order you want to delete records, then set the Array size and Transaction size = 1.

This does mean that if it aborts it will not have rolled back all the transactions because your Transaction size = 1.

Can you check whether you are starting a separate session for each link to BD you have? I imagine you might be, in which case I don't see how you can control all the delete statements as if they are one transaction as each session will act independently.

Sorry can't be more help.
Regards,

Nick.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Does not the ODBC stage also support Transaction Grouping?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Gautam19
Participant
Posts: 7
Joined: Fri Aug 26, 2005 12:24 am
Location: India

Post by Gautam19 »

ODBC stage does support transaction grouping. But that was another questions I had....
Would it be advisable to have all 50 links going into one ODBC stage. Will it open a new DB connection for every link.
But yes ODBC stage will solve our problem , only if use just one stage having all links to it.
Gautam Handa
trobinson
Participant
Posts: 208
Joined: Thu Apr 11, 2002 6:02 am
Location: Saint Louis
Contact:

Post by trobinson »

I would probably go with transaction grouping but another possible method would be to capture the REJECTEDCODE/REJECT of each preceding link and coding a utility job abort if any of the 15 particular ODBC stage links returns something other than success.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You can resize the stage icon to make the larger than usual number of input links easier to draw and clearer to caption and maintain.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply