Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Query Oracle error message text by error code in RDBMS
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>
>> <BR>
>> Does someone know how to query the error text for a given error code?<BR>
>> Are error texts stored in the database? I have Oracle Server 7.1.3.3.<BR>
>> <BR>
>> Thanks in advance,<BR>
>> <BR>
>> Tamas Szecsy<BR>
>> tszecsy_at_geometria.hu<BR>
><BR></DT>
>
><DT>Oracle provides a shell script to do it. Lets say you got an
>ORA-07429, then</DT>
>
><DT>to see that error text you would:</DT>
>
><DT> </DT>
>
><DT>% oerr ora 7429</DT>
>
><DT> </DT>
>
><DT>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.</DT>
>
><DT> </DT>
>
><DT> </DT>
>
></BODY>
></HTML>
>------------1B8779A56DCF0--
>
Thomas Kyte
Oracle Government
tkyte_at_us.oracle.com