Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Querying Oracle Errors
In article <38557623.99ED2A49_at_students.bbk.ac.uk>,
Sam Ricketts <amerc01_at_students.bbk.ac.uk> wrote:
>
> Am a beginner in oracle, and am doing some work which I need to
> retrieve some errors messages. I need to capture these errors before
> they actually occur, I cannot however raise all these errors on the
> server.
>
> Any help on which DLL, or data view one can query to retrieve
> other details on oracle errors.
>
> Sam
>
I am not sure this is what you want but:
On UNIX systems you have a utility oerr that will provide some error
message help:
seqdev 6 % oerr ora 01027
01027, 00000, "bind variables not allowed for data definition
operations"
// *Cause: An attempt was made to use a bind variable in a SQL data
definition
// operation.
// *Action: Such bind variables are not allowed.
In SQL*Plus you can use a routine like this to get error information:
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 ----------------------------------------------------------------------
v_rc number ; v_msg varchar2(100) ;
v_rc := v_err_no ; end if ; v_msg := sqlerrm(v_rc) ; dbms_output.put_line(v_msg) ; end ora_error ;
--
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 Tue Dec 14 1999 - 09:17:08 CST