我在两个库之间通过同义词创建了表的连接。实现当一个库中的表mds_wm_newnotice更新时,自动更新另一个库中的表daoyu对应的记录。现在同义词没有问题,创建的触发器如下:
create or replace trigger ag_sm_org
before update on mds_wm_newnotice
for each row
begin
    update daoyu set
    name=:new.ntwriter
    where smid=:old.pkid;
  
    update daoyu set
    province=:new.nttitle
    where smid=:old.nttitle;
  
end;
    当更新表mds_wm_newnotice后,oracle提示如下错误:
ORA-02055:分布式更新操作失败:要求回退
ORA-01722:无效数字
ORA-02063:紧接着line(起自TESTLINK)
ORA-06512:在"SGS_QZ_MDS_RUSTER.AG_SM_ORG",line 6
ORA-04088:触发器'SGS_QZ_MDS_RUSTER.AG_SM_ORG'执行过程中出错
    查了下,说是因为在触发器中不能连着执行两个update语句。
    后来我试着用两个存储过程pro_updateprovince和pro_updatetitle分别取代上述触发器中的update语句:
create or replace procedure "pro_updatetitle" (ntwriter in varchar2,pkid in long)
as
       strsql varchar2(100);
begin
       strsql := 'update daoyu set name=''' || ntwriter || ''' where smid=' || pkid;
       execute immediate strsql;
end pro_updatetitle;
    和
create or replace procedure "pro_updateprovince" (nttitle in varchar2,pkid in long)
as
       strsql varchar2(100);
bengin
       strsql := 'update daoyu set province=''' || nttitle || ''' where smid=' || pkid;
       execute immediate strsql;
end pro_updateprovince;
    并把触发器改成(触发器没有提示错误):
create or replace trigger ag_sm_org
before update on mds_wm_newnotice
for each row
begin
  
  pro_updateprovince(:new.nttitle,:new.pkid);
  pro_updatetitle(:new.nttitle,:new.pkid);end;
    然后更新表mds_wm_newnotice时又说找不到updateprovince的声明。
    请问我该怎么做哪?如何才能在一个触发器中先后执行多条update语句?
    请详细说明。