求救:Oracle 存储过程运行不能结束!!导致Job死???
数据库:Oracle9i
功能:将数据库A中的表sysdmlsend 和 sysdmlsendblob 中的数据远程插入到数据库B中的表sysdmlreceive和sysdmlreceiveblob中
问题:job死
现象:next date不更新下次执行时间,last date为空,total time刷新时变化
初步判断:job调用的存储过程执行时,不知什么原因,导致运行不能结束
为什么执行insert into这一行时,始终执行不过去,dblink是激活的。有些地方是好的,说明过程本身没有错误,很可能是网络状况不好造成,那为什么不超时抛出呢??
附存储过程和job如下:
create or replace procedure p_copytablere is
begin
insert into sysdmlreceive@dblink select sysid,syssql,0,sdate from sysdmlsend;
insert into sysdmlreceiveblob@dblink select sysid,startsql,blobcontent,endsql from sysdmlsendblob;
commit;
execute immediate 'truncate table sysdmlsend' ;
execute immediate 'truncate table sysdmlsendblob';
commit;
exception
when dup_val_on_index then
null;
when timeout_on_resource then
null;
when invalid_cursor then
null;
when not_logged_on then
null;
when login_denied then
null;
when no_data_found then
null;
when too_many_rows then
null;
when invalid_number then
null;
when zero_divide then
null;
when storage_error then
null;
when program_error then
null;
when value_error then
null;
when cursor_already_open then
null;
when others then
null;
end;
VARIABLE jobno number;
begin
DBMS_JOB.SUBMIT(:jobno, 'p_copytablere;', SYSDATE, 'SYSDATE + 30/1440');
commit;
end;