alter session set plsql_ccflags='dbg1:false,dbg2:20';
begin
$if $$dbg1 $then
dbms_output.put_line('hello');
$elsif $$dbg2=10 $then
dbms_output.put_line('Yes');
$else
dbms_output.put_line('No');
$end
end;
/
注意:end后面没有";"符号,有了这个功能后我们就可以在代码中
放入大量的调试开关,有点solaris下使用dtrace打开探针的感觉,
debug利器啊。
看来搞开发的一定要时刻关注新版本中PL/SQL引擎的改变,毕竟oracle
一直在对这个东西进行强化。
阅读(1759) | 评论(0) | 转发(0) |