Maintaining a oracle session across different OCI stage/Job

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
naveen_kumar
Participant
Posts: 4
Joined: Wed Dec 22, 2004 3:36 am

Maintaining a oracle session across different OCI stage/Job

Post by naveen_kumar »

Hi all
Can anyone guide me how to maintain a single oracle session across the OCI stages in different jobs, In other words I want to handle a single transaction across different sessions. I am doing transaction handling of 1000 records but my jobs writes only 500 records I don't want those records to be reflected in database till all the 1000 records are written, but what happens is that after completion of job iam able to see those 500 records in database.
What i feel is that after completion of job the transaction is committed.


______
Naveen
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

naveen_kumar wrote:Can anyone guide me how to maintain a single oracle session across the OCI stages in different jobs
Can't be done. When the job finishes, any uncomitted records at that point are comitted. Period.

You'll either need to find a way to do what you are doing all in one job or live with the 'intermediate' commits between jobs.
-craig

"You can never have too many knives" -- Logan Nine Fingers
rleishman
Premium Member
Premium Member
Posts: 252
Joined: Mon Sep 19, 2005 10:28 pm
Location: Melbourne, Australia
Contact:

Post by rleishman »

I don't think it's a good idea in your case, but with Oracle 10g you can perform point-in-time SELECTs (I think they are called FLASHBACK). They rely on the Archive/Redo log functionality in Oracle that supports backups.

Or, you could write all of your results to files and then load them afterwards.
Ross Leishman
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

You can't span transactions across separate OCI stages, much less OCI stages across jobs in one single commit. The best method left to you is to load work tables and then use an SP call to merge the data and commit.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Post Reply