Page 1 of 1

capturing the error message while loading into oracle

Posted: Thu Aug 02, 2007 1:16 pm
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

Posted: Thu Aug 02, 2007 3:52 pm
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.

Re: capturing the error message while loading into oracle

Posted: Mon Aug 06, 2007 6:21 am
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!

Posted: Mon Aug 06, 2007 6:30 am
by Maveric
See if this post by Vincent helps:
viewtopic.php?t=94683