ORA-01591: lock held by in-doubt distributed transaction

ORA-01591: lock held by in-doubt distributed transaction 14.19.171170

> select LOCAL_TRAN_ID,STATE,COMMIT# from dba_2pc_pending;

LOCAL_TRAN_ID          STATE            COMMIT#
---------------------- ---------------- ----------------
13.27.177217           forced rollback  2072410988
30.12.17616            forced rollback  1968528119
3.28.138795            prepared         2301659953
14.19.171170           prepared         2211492678

Elapsed: 00:00:00.01

> ROLLBACK FORCE '3.28.138795';
Rollback complete.

Elapsed: 00:00:00.10
> ROLLBACK FORCE '14.19.171170';

Rollback complete.

Elapsed: 00:00:00.10
> select LOCAL_TRAN_ID,STATE,COMMIT# from dba_2pc_pending;

LOCAL_TRAN_ID          STATE            COMMIT#
---------------------- ---------------- ----------------
13.27.177217           forced rollback  2072410988
30.12.17616            forced rollback  1968528119
3.28.138795            forced rollback  2301659953
14.19.171170           forced rollback  2211492678

Elapsed: 00:00:00.01
检查dba_2pc_pending的state列,如果是commited,意味着本地数据库提交已经成功。其他节点需要根据本地事务号和最大的commit#进行强制提交。用法如下:

       SVRMGR> COMMIT FORCE 'your local transactionID on this node', 'highest SCN from already committed site';

       SVRMGR> COMMIT FORCE '1.13.5197', '88123887';

如果commit point site的state为 commited 外的其他状态,则表明commit point site 没有提交成功,分布式事务需要强制回滚。这里不再需要所有节点的最大commit#。用法如下:

       SVRMGR> ROLLBACK FORCE 'your local transactionID on this node';

       SVRMGR> ROLLBACK FORCE '1.13.5197';

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值