Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamic view in Oracle showing description of error messages

Status
Not open for further replies.

dbalearner

Technical User
Aug 23, 2003
170
GB
Hi,

Is there any dynamic view in Oracle that displays the errorNo and description for Oracle error messages. I am aware of what is displayed in DBA_ERRORS, but that is not much of a help.

Thanks
 
Try the built in function, "sqlerrm". For example, if you create the following simple script and execute it, entering the value 923, you will get the output "ORA-00923: FROM keyword not found where expected"

Code:
set echo off
set showmode off
set feedback off
set linesize 200
set serveroutput on

prompt using &&error_number

variable id  number;
exec :id := &&error_number * -1;

exec dbms_output.put_line('==> ');
exec dbms_output.put_line('==> ');
exec dbms_output.put_line('==> '||sqlerrm( :id ) );
exec dbms_output.put_line('==> ');
exec dbms_output.put_line('==> ');

set veri on feed on
undef error_number

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top