欢迎投稿

今日深度:

ORA-01591:lockheldbyin-doubtdistributedtransaction问题解决

ORA-01591:lockheldbyin-doubtdistributedtransaction问题解决


昨天跑批量数据的程序时遇到oracle错误:

$tail -f INDB_ERROR_8.LOG

[Time]2014-12-01 04:10:31: activeAccountDeposit in oracle error: =ORA-01591: lock held by in-doubt distributed transaction 20.21.65527021
[Time]2014-12-01 04:10:31: 文件:/billing/drecv4/drecvlog/201411/DRECV/tmp/8-15-accountdeposit.dat改名到/billing/drecv4/drecvlog/201411/DRECV/tmp/8-15-accountdeposit.dat.err失败!ORA-01591: lock held by in-doubt distributed transaction 20.21.65527021
DwriteOffCore.cpp:3152
[Time]2014-12-01 04:10:31: 8-15-accountdeposit.dat更新表发生错误!ORA-01591: lock held by in-doubt distributed transaction 20.21.65527021
DwriteOffCore.cpp:4431

[Time]2014-12-01 04:10:31: 入库发生错误!

重复跑程序错误依旧。

打开数据库,查看这个tran_id确实有,其实是11月19号的时候就留下了这个事务。这是分布式事务的问题,当执行这个事务的时候遇到一些问题,比如网络问题,oracle就会卡住在这里,一直留着,当后面你更新到这条数据的时候就会报这个错。

\

然后找dba,他执行一下:

rollback force ‘20.21.65527021’

commit

搞定。

后续防止这个错误的其中一个方法就是,在跑批量程序前,统一先检查并杀掉这些阻塞。

www.htsjk.Com true http://www.htsjk.com/oracle/22692.html NewsArticle ORA-01591:lockheldbyin-doubtdistributedtransaction问题解决 昨天跑批量数据的程序时遇到oracle错误: $tail -f INDB_ERROR_8.LOG [Time]2014-12-01 04:10:31: activeAccountDeposit in oracle error: =ORA-01591: lock held by in-dou...
评论暂时关闭