How to kick a job with the changes in database table
Moderators: chulett, rschirm, roy
How to kick a job with the changes in database table
My Datastage job has to start running automatically based on database changes.
Example :
The default value is 'N' in table and When Flag is updated to 'Y' in the table, the datastage job need to start running automatically.
pls provide your suggestion on this scenario.
Thanks.
Example :
The default value is 'N' in table and When Flag is updated to 'Y' in the table, the datastage job need to start running automatically.
pls provide your suggestion on this scenario.
Thanks.
arun
Well without using a scheduler would be a sloppy solution that would require you to check for the status of the flag every x minutes.
I am not sure with Oracle, but with DB2 and ControlM/Control-O combo, you can have event driven tasks. I am currently implementing the exact same thing. Control-O recognizes the event, trigerrs ControlM which in turn triggers my jobs.
With Oracle, I wasnt too sure so I asked my Oracle DBA here, he said it is possible but he needs some time to dig up the info. As soon as he gets back to me, I can chime in on the specifics.
In the mean time, try searching in google, for event driven tasks.
I am not sure with Oracle, but with DB2 and ControlM/Control-O combo, you can have event driven tasks. I am currently implementing the exact same thing. Control-O recognizes the event, trigerrs ControlM which in turn triggers my jobs.
With Oracle, I wasnt too sure so I asked my Oracle DBA here, he said it is possible but he needs some time to dig up the info. As soon as he gets back to me, I can chime in on the specifics.
In the mean time, try searching in google, for event driven tasks.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
My DBA says that in 10g there is a database feature where you can create a "Job" which can run host commands. So if you have Oracle 10g then you can have a trigger on that particular column which will execute this "job", in which you can execute OS level commands.
Prior to 10g, there is no easy way of doing it.
Prior to 10g, there is no easy way of doing it.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
-
- Premium Member
- Posts: 892
- Joined: Thu Oct 16, 2003 5:18 am
You're not going to want to trigger the job directly from there unless you're willing to simply launch it without waiting for it to complete or being able to monitor its success or failure.
Just how tightly coupled do these processes need to be?
Just how tightly coupled do these processes need to be?
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
A simple google search for "oracle 10g event based job" yielded some good starting points ..for example http://www.oracle.com/technology/pub/ar ... html#eventakonda wrote:Yes we are using Oracle 10g.
Could you please provide me the navigation and the code to create a job in the trigger to fulfill this requirement.
Appreciated your help .Thanks.
Hope that helps.
If you manage to resolve this, please post your solution if possible for the benefit of others.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
As I see it you have two choices - to create triggers in the database that eventually invoke dsjob to run the DataStage job, or to have a DataStage job that polls the table in question as part of a sequence, perhaps.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
create a tastage loop and query the table every few seconds
If a change is detected, then kick off datastage job.