现场数据库(oracle -Version 10.2.0.1.0 )隔三差五的出现:
ORA-02062: distributed recovery received DBID bf38e3da, expected 7b66439b
ORA-02062: distributed recovery received DBID bf38e3da, expected 7b66439b
这个bug:----查询了下问题是这样滴:
/*****清楚这个分布式事务(该事务已经无法完成),不会对数据库有影响***/
/* 原因也就很容易找到了,是做一个大的通过dblink的两个db间的分布式事务的时候,
修改了dblink的链接指向,导致了正在运行的事务找不到原先正确的dblink了,
分布式事务卡在那里了 */
首先 查询出来被锁的分布式事物:
select local_tran_id,state from dba_2pc_pending;
local_tran_id state
29.35.745 collecting
26.46.775 collecting
16.29.1614 collecting
28.9.764 collecting
7.9.101548 collecting
然后再sys用户模式下面执行下面的语句:
EXECUTE DBMS_TRANSACTION.PURGE_LOST_DB_ENTRY('29.35.745');
commit;
EXECUTE DBMS_TRANSACTION.PURGE_LOST_DB_ENTRY('26.46.775');
commit;
EXECUTE DBMS_TRANSACTION.PURGE_LOST_DB_ENTRY('16.29.1614');
commit;
EXECUTE DBMS_TRANSACTION.PURGE_LOST_DB_ENTRY('28.9.764');
commit;
EXECUTE DBMS_TRANSACTION.PURGE_LOST_DB_ENTRY('7.9.101548');
commit;