I have this in my toolkit, to query only the error I am interested in:
Function Oerr (In_Number In Number)
Return Varchar2
Is
Begin
If In_Number < 0
Then
Return Sqlerrm (In_Number);
Else
Return Sqlerrm (-1*In_Number);
End If;
End Oerr;
Cheers,
Vasan.
-- --Original Message-- --
From: Jared.Still@(protected) [mailto:Jared.Still@(protected)]
Sent: 28 July 2004 18:08
To: oracle-l@(protected)
Subject: Re: data dictionary view with all oracle errors in it?
oracle-l-bounce@(protected) wrote on 07/27/2004 08:43:42 AM:
> Someone once posted here a cool script to retrieve the Oracle errors
(also
> event descriptions) in PL/SQL:
>
> SET SERVEROUTPUT ON
> DECLARE
> err_msg VARCHAR2(1000);
> BEGIN
> dbms_output.enable (1000000);
> FOR err_num IN 10000..11005
> -- FOR err_num IN 38001..39000
> LOOP
> err_msg := SQLERRM (-err_num);
> IF err_msg NOT LIKE '%Message '||err_num|| ' not found% ' THEN
> dbms_output.put_line (err_msg);
> END IF;
> END LOOP;
> END;
> /
>
> Tanel.
>
I find this version to be a little more useful. The dbms_output buffer is
not large enough for all messages, and some must be broken in to segments
This email and any attached to it are confidential and intended only for the
individual or entity to which it is addressed. If you are not the intended
recipient, please let us know by telephoning or emailing the sender. You
should also delete the email and any attachment from your systems and should
not copy the email or any attachment or disclose their content to any other
person or entity. The views expressed here are not necessarily those of
Churchill Insurance Group plc or its affiliates or subsidiaries. Thank you.
Churchill Insurance Group plc. Company Registration Number - 2280426.
England.
Registered Office: Churchill Court, Westmoreland Road, Bromley, Kent BR1
1DP.
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
To unsubscribe send email to: oracle-l-request@(protected)
put 'unsubscribe ' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --