当修改bd_psndoc表中的一行数据需要同步修改该表中引用该条数据的另一行数据,我通过如下触发器解决报错:
CREATE OR REPLACE TRIGGER tri_update_bd_pandoc
after update ON bd_psndoc
for each row
declare
Pragma Autonomous_Transaction;
BEGIN
if :new.isreferenced = 'N' or :new.isreferenced is null then
begin
update bd_psndoc set bd_psndoc.regular = :new.regular,bd_psndoc.regulardata =:new.regulardata where bd_psndoc.pk_psnbasdoc =:new.pk_psnbasdoc and bd_psndoc.isreferenced = 'Y';
end;
end if;
commit;
END;ORA-00060: 等待资源时检测到死锁
ORA-06512: 在 "ESSDATA.TRI_UPDATE_BD_PANDOC", line 6
ORA-04088: 触发器 'ESSDATA.TRI_UPDATE_BD_PANDOC' 执行过程中出错
CREATE OR REPLACE TRIGGER tri_update_bd_pandoc
after update ON bd_psndoc
for each row
declare
Pragma Autonomous_Transaction;
BEGIN
if :new.isreferenced = 'N' or :new.isreferenced is null then
begin
update bd_psndoc set bd_psndoc.regular = :new.regular,bd_psndoc.regulardata =:new.regulardata where bd_psndoc.pk_psnbasdoc =:new.pk_psnbasdoc and bd_psndoc.isreferenced = 'Y';
end;
end if;
commit;
END;ORA-00060: 等待资源时检测到死锁
ORA-06512: 在 "ESSDATA.TRI_UPDATE_BD_PANDOC", line 6
ORA-04088: 触发器 'ESSDATA.TRI_UPDATE_BD_PANDOC' 执行过程中出错
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货