capturing the error message while loading into oracle

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
Edwink
Participant
Posts: 47
Joined: Sat Aug 19, 2006 4:57 am
Location: Chennai

capturing the error message while loading into oracle

Post by Edwink »

friends,
i am using oracle stage to load the records into oracle Db .while loading, few records got rejected due to some reason.currently we are getting sql error code from the reject link,but i need to collect the message(reason for rejection) in a file.
please advice
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Execute the oerr command (perhaps in an External Filter stage) to decode the error, or query the Oracle system table that decodes error codes.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
prashkvrk
Participant
Posts: 15
Joined: Tue Nov 21, 2006 1:17 am
Location: Bangalore,India

Re: capturing the error message while loading into oracle

Post by prashkvrk »

Edwink wrote:friends,
i am using oracle stage to load the records into oracle Db .while loading, few records got rejected due to some reason.currently we are getting sql error code from the reject link,but i need to collect the message(reason for rejection) in a file.
please advice
in the target table set "output reject records as true". Then use a transformer stage after the target table. You will get a new column with name "sql code". u can collect this information in a sequential file. so you can get the sql error code. Now since you know the error code, depending on the error code write what ever reject reason you get based on the error code. This can be achieved by generating a new column say "reject reason" in the transformer.

Prasad!
Maveric
Participant
Posts: 388
Joined: Tue Mar 13, 2007 1:28 am

Post by Maveric »

See if this post by Vincent helps:
viewtopic.php?t=94683
Post Reply