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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Query Oracle error message text by error code in RDBMS

Re: Query Oracle error message text by error code in RDBMS

From: Thomas J. Kyte <tkyte_at_us.oracle.com>
Date: 1997/02/14
Message-ID: <3303cdba.4262228@nntp.mediasoft.net>#1/1

On Thu, 13 Feb 1997 20:15:07 -0500, oracle <oracle_at_nightmare.com> wrote:

>
>------------1B8779A56DCF0
>Content-Transfer-Encoding: 7bit
>Content-Type: text/plain; charset=us-ascii
>
>Tamas Szecsy wrote:
>>
>> Does someone know how to query the error text for a given error code?
>> Are error texts stored in the database? I have Oracle Server 7.1.3.3.
>>
>> Thanks in advance,
>>
>> Tamas Szecsy
>> tszecsy_at_geometria.hu
>
>Oracle provides a shell script to do it. Lets say you got an ORA-07429,
>then
>to see that error text you would:
>
>% oerr ora 7429
>
>It should return the error text. I am not sure about doing it from the
>withing the database as the errors are held externally in the message
>files.
>

If you are using NT (no oerr there) or using a client server program ( and might not have all the msg files on your host) you can:

SQL> set serveroutput on
SQL> exec dbms_output.put_line( sqlerrm( -7429 ) ) ORA-07429: smsgsg: shmget() failed to get segment.

PL/SQL procedure successfully completed.

SQL> sqlerrm will either return the last error encountered or, if you pass it an error code, the error message for that code...

>
>
>------------1B8779A56DCF0
>Content-Transfer-Encoding: 7bit
>Content-Type: text/html; charset=us-ascii
>
><HTML><BODY>
>
><DT>Tamas Szecsy wrote:<BR>
>&gt;&nbsp;<BR>
>&gt; Does someone know how to query the error text for a given error code?<BR>
>&gt; Are error texts stored in the database? I have Oracle Server 7.1.3.3.<BR>
>&gt;&nbsp;<BR>
>&gt; Thanks in advance,<BR>
>&gt;&nbsp;<BR>
>&gt; Tamas Szecsy<BR>
>&gt; tszecsy_at_geometria.hu<BR>
><BR></DT>
>
><DT>Oracle provides a shell script to do it.&nbsp; Lets say you got an
>ORA-07429, then</DT>
>
><DT>to see that error text you would:</DT>
>
><DT>&nbsp;</DT>
>
><DT>% oerr ora 7429</DT>
>
><DT>&nbsp;</DT>
>
><DT>It should return the error text.&nbsp; I am not sure about doing it
>from the withing the database as the errors are held externally in the
>message files.</DT>
>
><DT>&nbsp;</DT>
>
><DT>&nbsp;</DT>
>
></BODY>
></HTML>
>------------1B8779A56DCF0--
>

Thomas Kyte
Oracle Government
tkyte_at_us.oracle.com                          

http://govt.us.oracle.com


statements and opinions are mine and do not necessarily reflect the opinions of Oracle Corporation Received on Fri Feb 14 1997 - 00:00:00 CST

Original text of this message

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