DS rollback and triggers

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
stivazzi
Participant
Posts: 52
Joined: Tue May 02, 2006 3:53 am

DS rollback and triggers

Post by stivazzi »

Good morning to everyone...
i'm totally newbie about DS, and i'm trying to understand how to use it.
in particular, i got 2 problems:
when some modifications happen in db1, i should send them to db2(1st question: how can i start a trigger?);
again... i have 2 tables on db1, i have to copy records into 2tables with same structure in db2. but i don't know how... from table to another table1 in 2 different db it's clear (table>transformer>table 2)... but from 2 2 tables to 2 tables?
if the second transaction fails i should perform a rollback of first transaction, but... how can i tell DS to wait for performing a commit?

i hope i explained myself
thanks a lot

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

Post by ray.wurlod »

Welcome aboard. :D

How do you detect that a change has occured in db1? What kind of change detection mechanism do you use? Have you implemented triggers in db1? If so, can a trigger invoke an operating system command?

To insert rows into two tables as a single transaction, you can use an ODBC stage with two input links (one for each table), and specify that the stage is to use transaction grouping. How you co-ordinate from the two source tables is a matter of design for you to resolve, and will depend on the relationship - if any - between rows in the two source tables.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Sreenivasulu
Premium Member
Premium Member
Posts: 892
Joined: Thu Oct 16, 2003 5:18 am

Post by Sreenivasulu »

DESIGN suggestion-

You can write a DS job which would poll the source table which is expecting a change. This DS job would be polling at a periodic interval
with the help of a sequencer. Once a change occurs a set of jobs can be run. This way you can simulate a trigger.


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

Post by ray.wurlod »

Have you considered a solution involving database replication services?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
sb_akarmarkar
Participant
Posts: 232
Joined: Fri Sep 30, 2005 4:52 am
Contact:

Post by sb_akarmarkar »

You can also try with Database link between db1 and db2
Try the query with Begin ... End.

I hope that will help you but i am not sure.

Thanks,
Anupam
Post Reply