日期:2014-05-16  浏览次数:20688 次

关于ORA-01591问题
系统中偶尔会出现ORA-01591 分布式事务锁的问题。每次把事务回滚了。隔一段时间(几天或是十几天)又出现。

哪位大神可以告诉我ORA-01591 产生的原因。以及解决方案么?

对于ORACLE 还不是很精。所以请尽量描述详细点。谢谢

------解决方案--------------------
一般情况下,Oracle错误最快的解决办法是查错误编码,比如楼主这里是:ORA-01591。就直接去Google下,有时候不能给出你准确答案,却常常能让给你点提示,楼主可以参考以下文章:http://www.mscto.com/Oracle/2009030888843.html、http://blog.csdn.net/csucxcc/article/details/5727560
------解决方案--------------------
看alert log里面有没有相关的信息,应该用trc记录,把trc信息贴出来
------解决方案--------------------
ORA-01591: lock held by in-doubt distributed transaction string 
Cause: Trying to access resource that is locked by a dead two-phase commit transaction that is in prepared state.
Action: DBA should query the pending_trans$ and related tables, and attempt to repair network connection(s) to coordinator and commit point. If timely repair is not possible, DBA should contact DBA at commit point if known or end user for correct outcome, or use heuristic default if given to issue a heuristic commit or abort command to finalize the local portion of the distributed transaction.

看来还是锁引起的,查锁吧
v$lock,v$locked_object
------解决方案--------------------
看来还是锁引起的,查锁吧
v$lock,v$locked_object
------解决方案--------------------
看alert log里面有没有相关的信息,应该用trc记录,把trc信息贴出来