How to debug procedure in Oracle

1.create a table with two columns

CREATE TABLE t_debug_log(StepInfo VARCHAR2(100 BYTE), intime datetime)

2. in the procedure declare    l_dml varchar2(32767);

if is bool

IF v THEN

l_dml := 'insert into t_debug_log (StepInfo,intime) values( v, sysdate)';

execute immediate l_dml; END IF;

else

l_dml := 'insert into t_debug_log (StepInfo,intime) values( v, sysdate)';

execute immediate l_dml;

 

so i can see which step is wrong.

posted on 2014-02-26 10:02  子虚乌有  阅读(226)  评论(0)    收藏  举报