10g
1、 设置DBMS_OUTPUT.put_line输出显示 SET SERVEROUTPUT ON
2、 关闭DBMS_OUTPUT.put_line输出显示 SET SERVEROUTPUT OFF
3、 设置DBMS_OUTPUT缓冲区大小 SET SERVEROUTPUT ON SIZE number(1000) dbms_output.enable(1000)
4、 设置只显示DBMS_OUTPUT默认的长度 SET SERVEROUTPUT ON FORMAT TRUNCATED
5、 设置空格的输出 SET SERVEROUTPUT ON FORMAT WRAPPED
6、 取消空格的输出 SET SERVEROUTPUT ON FORMAT WORD_WRAPPED
show line error number test code【10g】
CreateOrReplaceProcedure Proc_testErrLine
Is
i number(8);
Begin
i:=1/0;
exception
when others then
dbms_output.put_line(dbms_utility.format_error_stack());
dbms_output.put_line(dbms_utility.format_call_stack());
dbms_output.put_line(dbms_utility.format_error_backtrace());
End proc_testErrLine;
exec proc_testErrLine;
【输出结果】
ORA-01476: divisor is equal to zero
----- PL/SQL Call Stack -----
object line object
handle number name
6978D4BC 10 procedure CQMKT.PROC_TESTERRLINE
6846F2C0 7 anonymous block
ORA-06512: at "CQMKT.PROC_TESTERRLINE", line 5
--转自