关于DBlink与游标一个问题
cursor c_getwodetail is
select distinct xwt.wip_entity_name
from xxwip_wrotosfc_temp@prod xwt
where xwt.insorupd_flag in ('I', 'U', 'R')
and xwt.organization_id = 2083
order by xwt.wip_entity_name;
for r_wrodetail in c_getwodetail loop
if tres is null then
--if Download Success then update flag in ERP
begin
update xxwip_wrotosfc_temp@prod
set insorupd_flag = null
where insorupd_flag in ('I', 'U', 'R')
and wip_entity_name = r_wrodetail.wip_entity_name;
commit;
exception
when others then
rollback;
end;
end if;
tres := null;
end loop;
相关代码如上。
想问一下各位大虾,通过DBlink连接远程数据库的游标中多次对该表进行Commit或者Rollback是否有问题。
因为只要网络不稳定,每次数据库都因游标内的SQL导致ORA-07445内部错误,错误信息如下:
Thu Dec 08 14:50:54 2011
Thread 1 advanced to log sequence 41366
Current log# 3 seq# 41366 mem# 0: T:\ORACLE\xxDB\REDO03.LOG
Thu Dec 08 14:51:09 2011
Errors in file t:\oracle\bdump\xxdb_j001_2528.trc:
ORA-07445: exception encountered: core dump [ACCESS_VIOLATION] [_kpnfch+224] [PC:0xF986B4] [ADDR:0x84] [UNABLE_TO_READ] []
Trac 文件如下:
ksedmp: internal or fatal error
ORA-07445: exception encountered: core dump [ACCESS_VIOLATION] [_kpnfch+224] [PC:0xF986B4] [ADDR:0x84] [UNABLE_TO_READ] []
Current SQL statement for this session:
SELECT DISTINCT XWT.WIP_ENTITY_NAME FROM XXWIP_WROTOSFC_TEMP@PROD XWT WHERE XWT.INSORUPD_FLAG IN ('I', 'U','R') AND XWT.ORGANIZATION_ID = 2083 ORDER BY XWT.WIP_ENTITY_NAME
----- PL/SQL Call Stack -----
object line object
handle number name
4A3AE7F0 80 procedure
xx.WO_WRO
4A126AAC 1 anonymous block
----- Call Stack Trace -----
calling call entry argument values in hex
location type point (? means dubious value)
-------------------- -------- -------------------- ----------------------------
_kpnfch+224 00000000
__VInfreq__opifch2+ CALLrel _kpnfch+0
。。。。。。。。
请各位高手指点....