ORA-01591: lock held by in-doubt distributed transaction
来源:互联网 发布:为什么网络信息不可靠 编辑:程序博客网 时间:2024/06/10 07:41
ORA-01591: lock held by in-doubt distributed transaction
引文档如下:
错误代码:ORA-01591
错误原因:使用了分布式事务,造成这个问题的原因很多时候都是由于网络问题造成的
解决办法:
1.找到TRAN_ID
Select 'Rollback force '''||LOCAL_TRAN_ID||'''' from sys.pending_trans$;
2.將其COMMIT或ROLLBACK:
rollback force LOCAL_TRAN_ID;
commit force LOCAL_TRAN_ID;
3.如果执行失败,则强行从资料字典中删除该交易记录:
set transaction use rollback segment system;
delete from dba_2pc_pending where local_tran_id = LOCAL_TRAN_ID;
delete from pending_sessions$ where local_tran_id = LOCAL_TRAN_ID;
delete from pending_sub_sessions$ where local_tran_id = LOCAL_TRAN_ID;
commit;
4.执行失败,还一种情况可以尝试下重起一下Oracle服务,这种情况我遇到过一次,重新启动后该锁自动解除(因为对删除数据字典比较担心,所以胡乱试了一次重启数据库,前提是执行了commit force LOCAL_TRAN_ID;失败之后重新启动)
5.生成语句操作语句的程序
begin
for r in (select local_tran_id
from dba_2pc_pending t
where t.state = 'collecting') loop
--dbms_output.put_line('commit force '''||r.local_tran_id||''';');
dbms_output.put_line('delete from dba_2pc_pending where local_tran_id = '''||r.local_tran_id||''';');
dbms_output.put_line('delete from pending_sessions$ where local_tran_id = '''||r.local_tran_id||''';');
dbms_output.put_line('delete from pending_sub_sessions$ where local_tran_id = '''||r.local_tran_id||''';');
end loop;
dbms_output.put_line('commit;');
end;
- ORA-01591: lock held by in-doubt distributed transaction
- ORA-01591: lock held by in-doubt distributed transaction
- ORA-01591: lock held by in-doubt distributed transaction
- ORA-01591: lock held by in-doubt distributed transaction问题解决
- ORA-01591: lock held by in-doubt distributed transaction 以及分布式事务处理总结
- ORA-01591: lock held by in-doubt distributed transaction 22.10.18863
- ORA-01591:lock held by in-doubt distributed transacation 解析
- ORA-01591: lock held by in-doubt…
- ORA-02049: timeout: distributed transaction waiting for lock
- In-Doubt Transactions
- Distributed Lock
- Error code at the Distributed Transaction Coordinator service in XP
- Distributed Database and Distributed Transaction
- BEGIN DISTRIBUTED TRANSACTION
- Distributed Transaction Processing:mysql
- Distributed Transaction Patterns
- How to identify a session started by a remote distributed transaction? (文档 ID 332326.1)
- oracle unable to load oraMTS , unable to enlist in a distributed transaction .
- 初学者如何学习运维?
- hibernate ehcache 二级缓存
- 坚信每个人都能成为品牌
- 企业的人性和狼性
- 并查集的反思-----小希的迷宫与Is It a Tree?
- ORA-01591: lock held by in-doubt distributed transaction
- ddms:null java.lang.NullPointerException
- 《兵临城下》:360输在“斯大林格勒”?
- linux 下面获取文件大小
- export variable if the child shell wanted to inherit the environment variables of parent shell
- 预处理程序 宏定义 掌握例子
- 比尔盖茨的噩梦
- 时间处理
- SQL Server 存储过程