Page 1 of 1

Extract Oracle Ora-Error description

Posted: Sat Jul 14, 2007 9:31 pm
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.

Posted: Sat Jul 14, 2007 10:14 pm
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.

Posted: Sat Jul 14, 2007 10:33 pm
by willpeng
Hm... That gave me some idea. Thanks.

Posted: Sun Jul 15, 2007 1:52 am
by ray.wurlod
Investigate the link variable LASTERR. That is the error text generated by the database server (or by the ODBC driver, perhaps).

Posted: Mon Jul 16, 2007 3:51 am
by sachin1
link variable DBMSCODE. can help you, but regarding description of each oracle error is little tough.

Re: Extract Oracle Ora-Error description

Posted: Mon Jul 16, 2007 4:56 am
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

Re: Extract Oracle Ora-Error description

Posted: Mon Jul 16, 2007 12:03 pm
by willpeng
Thx, guys, I will check out the LastErr.

Posted: Mon Jul 16, 2007 12:43 pm
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?