How to trace the errors in pl/sql block code?

Answer Posted / shai

Follow best practice for exceptions:

Try using: (available from 10g)

1. dbms_utility.format_error_backtrace
2. dbms_utility.format_error_stack

Example:

declare
x varchar2(10);
begin
select 15445454545 into x from dual;
exception
when others then
dbms_output.put_line
(dbms_utility.format_error_backtrace || ' ' ||
dbms_utility.format_error_stack);
end;

Is This Answer Correct ?    7 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between a database and a relational database?

561


What is the benefit of foreign key?

528


What do you mean by query optimization?

552


What can sql server reporting services do?

584


explain advantages of innodb over myisam. : Sql dba

648






Which are the different character-manipulation functions in sql?

550


Is sql an operating system?

545


How many indexes can be created on a table in sql?

498


What are the rules to be applied to nulls whilst doing comparisons?

755


Difference between table function and pipelined function?

588


What is dml and ddl?

527


Is sql similar to python?

538


Does sql between include endpoints?

554


What is not in sql?

500


What is native sql query?

554