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】
1 Create Or Replace Procedure Proc_testErrLine
2 Is
3 i number(8);
4 Begin
5 i:=1/0;
6
7 exception
8 when others then
9 dbms_output.put_line(dbms_utility.format_error_stack());
10 dbms_output.put_line(dbms_utility.format_call_stack());
11 dbms_output.put_line(dbms_utility.format_error_backtrace());
12 End proc_testErrLine;
13 /
14 Show Err;
【输出结果】
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