Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: oracle errors

Re: oracle errors

From: Thomas J. Kyte <tkyte_at_us.oracle.com>
Date: 2000/06/15
Message-ID: <8ibmkd$jto$1@nnrp1.deja.com>#1/1

In article <8i8rqk$gjr$1_at_nnrp1.deja.com>,   marima_at_my-deja.com wrote:
> whats the syntax for the command to list oracle errors
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>

In addition to oerr, which others have posted, the plsql function sqlerrm, which by defaults returns the text of the LAST error encountered, can return the text of any error message:

ops$tkyte_at_8.0> set serveroutput on
ops$tkyte_at_8.0> exec dbms_output.put_line( sqlerrm(-1) ) ORA-00001: unique constraint (.) violated

PL/SQL procedure successfully completed.

--
Thomas Kyte (tkyte_at_us.oracle.com) Oracle Service Industries
Howtos and such: http://osi.oracle.com/~tkyte/index.html
Oracle Magazine: http://www.oracle.com/oramag
Opinions are mine and do not necessarily reflect those of Oracle Corp


Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Thu Jun 15 2000 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US