oracle rollback datastage

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
just4u_sharath
Premium Member
Premium Member
Posts: 236
Joined: Sun Apr 01, 2007 7:41 am
Location: Michigan

oracle rollback datastage

Post by just4u_sharath »

Hi
I have a really interesting scenario
" Initially i run the sequencer. There are 6 jobs in the sequencer. In the 2nd job i will update an oracle table. later all the jobs will be run. but if any job (3,4,5,6) job fails, i have to rollback the data in the oracle table.(i want the data in the oracle table before updation took place).Is this scenario can be met with the datastage
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Not via rollback since you commit in job #2. What you need to do is to include some mechanism for identifying the rows that are loaded (such as a unique run ID or a timestamp) and delete these should that become necessary. If you need to "rollback" updates or deletes, it becomes a little more convoluted, in as much as you need to have a "before image" of the target table stored somewhere before running the DataStage jobs, then run other recovery jobs as necessary.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Re: oracle rollback datastage

Post by chulett »

just4u_sharath wrote:Is this scenario can be met with the datastage
Just for the record, this particular scenario can't be met with any tool. As noted, comitted is comitted, so no rollback is available after the fact. Now, that doesn't mean you can't play fancy games with some kind of 'before image' as Ray notes, or with flashback perhaps, but a simple rollback is off the table.
-craig

"You can never have too many knives" -- Logan Nine Fingers
just4u_sharath
Premium Member
Premium Member
Posts: 236
Joined: Sun Apr 01, 2007 7:41 am
Location: Michigan

oracle rollback datastage

Post by just4u_sharath »

I particularly know what row is going to be updated. How can i create a before image of the table with datastage itself. even i create a before image of the table, can i recover it using the datastage. Imp.point is this recovery should be automatic. I cannot go and run the recovey job, after knowing my job failed. As craig said, what is a flash back
just4u_sharath
Premium Member
Premium Member
Posts: 236
Joined: Sun Apr 01, 2007 7:41 am
Location: Michigan

oracle rollback stage

Post by just4u_sharath »

ray.wurlod wrote:Not via rollback since you commit in job #2. What you need to do is to include some mechanism for identifying the rows that are loaded (such as a unique run ID or a timestamp) and delete these should that become necessary. If you need to "rollback" updates or deletes, it becomes a little more convoluted, in as much as you need to have a "before image" of the target table stored somewhere before running the DataStage jobs, then run other recovery jobs as necessary.
I particularly know what row is going to be updated. How can i create a before image of the table with datastage itself. even i create a before image of the table, can i recover it using the datastage. Imp.point is this recovery should be automatic. I cannot go and run the recovey job, after knowing my job failed. As craig said, what is a flash back
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Re: oracle rollback stage

Post by chulett »

just4u_sharath wrote:As craig said, what is a flash back
A simple Google will turn up information on the technology, which was introduced in 9i and improved in subsequent releases. Have a chat with your DBA to see if it is something they are willing and/or able to support. One such URL:

Oracle Flashback Technology
-craig

"You can never have too many knives" -- Logan Nine Fingers
keshav0307
Premium Member
Premium Member
Posts: 783
Joined: Mon Jan 16, 2006 10:17 pm
Location: Sydney, Australia

Post by keshav0307 »

store the records you are going to update in a temporary table, before you actually update it, and if your later stage jobs failed then delete the updated records and insert the old records from the temporary table.
Post Reply