存储过程记录异常日志的功能
我的数据库版本是Oracle 11GR2
我有3个业务存储过程sp1,sp2,sp3,1个记录日志的存储过程sp_log。
create or replace procedure sp1 as
begin
sp2;
exception when others then
sp_log;
end sp1;
create or replace procedure sp2 as
begin
sp3;
exception when others then
sp_log;
end sp2;
create or replace procedure sp3 as
n number;
begin
n:='a';
end sp3;
现在我用job跑sp1,sp3这里肯定会报错,那么sp2里面的日志能记到sp3的错误信息,但sp1不会记任何日志啊,就是不会捕捉到sp3的异常,这样我就不知道sp1为何跑失败了。请问各位大佬有没遇到过这种情况,怎么解决的,拜谢!