一.报错信息
Sun Oct 28 00:46:33 2018 Error 3113 trapped in 2PC on transaction 644.3.881743. Cleaning up. Error stack returned to user: ORA-02054: transaction 644.3.881743 in-doubt ORA-03113: end-of-file on communication channel ORA-02063: preceding line from KMESBA Sun Oct 28 00:46:34 2018 DISTRIB TRAN OMES.2b7345a.644.3.881743 is local tran 644.3.881743 (hex=284.03.d744f) insert pending prepared tran, scn=14593464857025 (hex=d45.ce49f1c1)
二.分析
此类问题通常是由于网络问题或远程数据库异常导致的分布式事务失败。
执行下面SQL语句
select LOCAL_TRAN_ID,GLOBAL_TRAN_ID,STATE,MIXED,HOST,COMMIT# from dba_2pc_pending; #dba_2pc_pending视图记录等待恢复的分布式事务的信息 select * from DBA_2PC_NEIGHBORS; #视图记录未决的分布式事务的输入输出连接信息
三.处理
1.如果在上述视图中查询到记录,则尝试force commit/rollback
commit force '644.3.881743';
2.如果不成功则进行如下操作
(1).Disable分布式恢复 SQL> ALTER SYSTEM DISABLE DISTRIBUTED RECOVERY; System altered. (2).Puege(清空)in-doubt transaction entry: SQL> exec DBMS_TRANSACTION.PURGE_LOST_DB_ENTRY('644.3.881743'); PL/SQL procedure successfully completed. (3).然后enable 分布式恢复: SQL> ALTER SYSTEM ENABLE DISTRIBUTED RECOVERY;
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。