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: How can I know the possible error numbers in the view deferror?

Re: How can I know the possible error numbers in the view deferror?

From: <markp7832_at_my-deja.com>
Date: Wed, 22 Dec 1999 15:27:55 GMT
Message-ID: <83qqll$npk$1@nnrp1.deja.com>


In article <385FC6FA.B3DA932D_at_nortel.com>,   Steve Lu <stevelu_at_nortel.com> wrote:
> Hello!
>
> I am working on a replication monitor which needs to check the error
> number in the DEFERROR view. Since the monitor will only be interested
> in certain errors, I have to know the corresponding error number for
> those concerned errors.
> The oerr can map the error id to the error message which is helpful in
> my case.
> Is there any place I can find a (system) table for the system errors
> (error_id & error description)?
>
> Thanks in advance!
>
> Steve Lu
> Nortel Networks Inc.
> stevelu_at_nortelnetworks.com
>

I do not know of any table you can read by you could place the following pl/sql block in a loop of 1..N and generate such an animal by replacing the dbms_output with an insert:

set echo off
rem
rem Pl/sql script to create procedure to report Oracle error messages rem in sqlplus
rem
rem Note - you can in sqlplus issue:

rem       set serveroutput on
rem       execute dbms_output.put_line(sqlerrm(-01017))
rem
rem --------------------------------------------------------------------
--
rem 1996 07 11 m d powell New script. rem 1998 06 23 m d powell Modify to be in-stream procedure from stored
rem
set feedback off
set serveroutput on
set verify off
accept err_code prompt "Enter Oracle Error Number, i.e, ORA-00100 = 100 ==> "
declare
procedure ora_error (
  v_err_no in number
  )
is
v_rc       number              ;
v_msg      varchar2(100)       ;

--
begin
if v_err_no > 0 then
  v_rc := v_err_no * -1 ;
else
  v_rc  :=  v_err_no           ;
end if                         ;
v_msg  :=  sqlerrm(v_rc)       ;
dbms_output.put_line(v_msg)    ;
end ora_error                  ;

--
begin
 ora_error(&err_code);
end;
/
set feedback on
undefine err_code

--
Mark D. Powell -- The only advice that counts is the advice that  you follow so follow your own advice --

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Wed Dec 22 1999 - 09:27:55 CST

Original text of this message

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