Extract Oracle Ora-Error description

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
willpeng
Participant
Posts: 18
Joined: Wed Apr 07, 2004 9:24 pm
Location: Middletown, NJ

Extract Oracle Ora-Error description

Post by willpeng »

Hey, just wondering if anyone tried to extract the Oracle ORA-? Description within a server job during insert/update. I know it's found in run Log, but anyone has tried to do it within the job itself?

The best I found it is the Code itself use the DBMSCODE in the Link Variable Outputs. But it is just the code, but no description as the warning in the log. Any idea??? Thx.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

During the job that is generating the errors? No. Prefer to build jobs that don't generate errors. :wink: When they do, get the information from the log.

You'd need some kind of hook into 'oerr', perhaps a web service? Or pull a list from somewhere and populate a hashed file you could look up the description from. Seems like that would be pretty straight-forward to arrange.
-craig

"You can never have too many knives" -- Logan Nine Fingers
willpeng
Participant
Posts: 18
Joined: Wed Apr 07, 2004 9:24 pm
Location: Middletown, NJ

Post by willpeng »

Hm... That gave me some idea. Thanks.
William Peng
DW/ETL Consultant
Middletown, NJ
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Investigate the link variable LASTERR. That is the error text generated by the database server (or by the ODBC driver, perhaps).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
sachin1
Participant
Posts: 325
Joined: Wed May 30, 2007 7:42 am
Location: india

Post by sachin1 »

link variable DBMSCODE. can help you, but regarding description of each oracle error is little tough.
reddy.vinod
Participant
Posts: 36
Joined: Mon Jul 16, 2007 3:37 am
Location: USA

Re: Extract Oracle Ora-Error description

Post by reddy.vinod »

willpeng wrote:Hey, just wondering if anyone tried to extract the Oracle ORA-? Description within a server job during insert/update. I know it's found in run Log, but anyone has tried to do it within the job itself?

The best I found it is the Code itself use the DBMSCODE in the Link Variable Outputs. But it is just the code, but no description as the warning in the log. Any idea??? Thx.
Hi,
You can capture the ORA error's .While loading the data into database table from transformer you simply take another link connect it to one seuential file ,take one column in sequential file next in the column derivation use DSGetLinkInfo(DSJ.ME,transformername,linkname,DSJ.LINKLASTERR)
bythe above method u can get the ora error's
VINOD
willpeng
Participant
Posts: 18
Joined: Wed Apr 07, 2004 9:24 pm
Location: Middletown, NJ

Re: Extract Oracle Ora-Error description

Post by willpeng »

Thx, guys, I will check out the LastErr.
William Peng
DW/ETL Consultant
Middletown, NJ
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

The OCI stage doesn't return the error description in any link variable that I recall. Perhaps with a 10g client? Or via ODBC?
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply