That's so easy.procedure test -- write_log... call_fn1(..); -- write_log... call_fn2(..); -- write_log... end test;if want debug in sqlplus; well, you need set the 'serverout' before, for example: SQL>set serveroutput on;in procedure and use job to run. use write log to table.if want to know which line had error when exception occur, add following:EXCEPTION WHEN OTHERS THEN ROLLBACK; v_sqlText:= SQLERRM|| ';' ||substr(dbms_utility.format_error_backtrace, 1, 100); --write v_sqlText to log COMMIT;
btw: dbms_utility.format_error_backtrace in 10g. ^_^
用TOAD自带的SQLMonitor工具就可以实现可以实现类似Microsoft SQL Server Profiler 的功能
好象也试过。一直不怎么稳定的好象.还有其他的吗.大家介绍点啊??
好像oracle的事件跟踪一直都不清楚,也望高人指点。
调试的话用pl/sql developer挺好的
调试的话可以使用一些第三方的工具。
比如楼上所说。
可以看到执行的过程和参数
调试的话用pl/sql developer挺好的
pl/sql developer一直用的.有人做过跟踪没啊
-- write_log... call_fn1(..); -- write_log... call_fn2(..); -- write_log... end test;if want debug in sqlplus; well, you need set the 'serverout' before,
for example:
SQL>set serveroutput on;in procedure and use job to run. use write log to table.if want to know which line had error when exception occur, add following:EXCEPTION
WHEN OTHERS THEN
ROLLBACK;
v_sqlText:= SQLERRM|| ';' ||substr(dbms_utility.format_error_backtrace, 1, 100);
--write v_sqlText to log
COMMIT;
例如,在PL/SQL中找到你的存储过程右键->TEST就OK了
记得先加断点