Oracle stage - can we treat one specific error as fatal

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
ahmediftikhar
Participant
Posts: 22
Joined: Thu Jul 29, 2004 8:10 am

Oracle stage - can we treat one specific error as fatal

Post by ahmediftikhar »

Hi

I'm using OCI to load data into oracle table. We have option "Treat warning message as a fatal error" to abort the job if any warning occurs. My question is, can i filter out only one warning (oracle error) as fatal and rest can be ignored?


Thanks in advance
Ahmed.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Hi,
One way is to handle the messages.
Collect all the error messge related to oracle and promote it to Fatal. :wink:

regards
kumar
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

I haven't ever tried it, but you could consider putting the return SQL DBMS variables that come back into another output link and constrain that link to a list of error values. If you want any of those values to abort the job, just set the Abort After N Rows value on that new link to 1 to abort on the first code.
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
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Ken's suggestion is the way to go - specific reject links for specific errors or groups of errors. That way you can control how many it takes per link before it aborts the job.
-craig

"You can never have too many knives" -- Logan Nine Fingers
vmcburney
Participant
Posts: 3593
Joined: Thu Jan 23, 2003 5:25 pm
Location: Australia, Melbourne
Contact:

Post by vmcburney »

kumar_s wrote:Hi,
One way is to handle the messages.
Collect all the error messge related to oracle and promote it to Fatal. :wink:

regards
kumar
I've used this successfully to elevate parallel DB2 errors from information to warning messages. It works if the warning messages use the same message ID, but if your Oracle stage uses a variety of different warning message ids it can be hard to find and upgrade all of them. It certainly is a fast and easy way to turn a warning into an abort.
ahmediftikhar
Participant
Posts: 22
Joined: Thu Jul 29, 2004 8:10 am

Post by ahmediftikhar »

Many thanks to everyone :D. I have achieved this in 2 way. One, added constraint to check appropriate DBMSCODE and used UtilityAbortToLog transform to abort the job. Second, added one more output link which will reject the record if appropriate DBMSCODE comes and AbortAfterRow is set to 1 in the constraint.

Thanks again
Ahmed.
Post Reply