How to control stage run sequence within a job ?

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
xinhuang66
Participant
Posts: 161
Joined: Wed Aug 02, 2006 4:30 am

How to control stage run sequence within a job ?

Post by xinhuang66 »

Just curious to know if we can control, I had a job with the structure like this, it is about oracle DB.

Input stream and target table get into change capture, after change capture, there are two branches, one go to update the target table, the other is doing sqlldr to the target if there are some new records.

I suspect there might be some serious problems in the job, if sqlldr starts first, then update will wait sqlldr finished and start to run.

However if update starts first, sqldr (direct mode) requires exclusive access, then sqldr will fail with 'nowait error', even if we use conventional load, then sqlldr don't require exclusive access, rebuild index requires exclusive access as well, then rebuild index will fail.

I am wondering in such a structure, can we do something to make sure sqldr is always started first and update will start until sqldr finish, apart from put them into two different jobs.

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

Post by ray.wurlod »

Use different jobs.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
John Smith
Charter Member
Charter Member
Posts: 193
Joined: Tue Sep 05, 2006 8:01 pm
Location: Australia

Post by John Smith »

Can you put your UPDATE as a After Job subroutine that runs after your load (sqlldr) finished? But you may need to be able to build the SQL script to do the UPDATE. Not recommended but I believe it's possible.
Post Reply