阿里云-云小站(无限量代金券发放中)
【腾讯云】云服务器、云数据库、COS、CDN、短信等热卖云产品特惠抢购

ORA-24756: transaction does not exist问题解决

174次阅读
没有评论

共计 2974 个字符,预计需要花费 8 分钟才能阅读完成。

今天在服务器看 alert 日志发现报错如下:
—————————————————- >>
Fri May 16 02:55:05 2016
 Errors in file /u01/app/Oracle/diag/rdbms/bus/bus/trace/bus_reco_2590.trc:
 ORA-24756: transaction does not exist
 Errors in file /u01/app/oracle/diag/rdbms/bus/bus/trace/bus_reco_2590.trc:
 ORA-24756: transaction does not exist
 Errors in file /u01/app/oracle/diag/rdbms/bus/bus/trace/bus_reco_2590.trc:
 ORA-24756: transaction does not exist
 Errors in file /u01/app/oracle/diag/rdbms/bus/bus/trace/bus_reco_2590.trc:
 ORA-24756: transaction does not exist
 Errors in file /u01/app/oracle/diag/rdbms/bus/bus/trace/bus_reco_2590.trc:
 ORA-24756: transaction does not exist
 Errors in file /u01/app/oracle/diag/rdbms/bus/bus/trace/bus_reco_2590.trc:
 ORA-24756: transaction does not exist

查看具体 trace 文件 /u01/app/oracle/diag/rdbms/bus/bus/trace/bus_reco_2590.trc 内容如下:
——————————————————>>
 *** 2016-05-15 20:31:15.492
 *** SESSION ID:(576.1) 2016-05-15 20:31:15.492
 *** CLIENT ID:() 2016-05-15 20:31:15.492
 *** SERVICE NAME:(SYS$BACKGROUND) 2016-05-15 20:31:15.492
 *** MODULE NAME:() 2016-05-15 20:31:15.492
 *** ACTION NAME:() 2016-05-15 20:31:15.492
 
 *** TRACE FILE RECREATED AFTER BEING REMOVED ***

 *** 2016-05-15 20:31:15.491
 ERROR, tran=12.3.3589, ose=0:
 ORA-24756: transaction does not exist

 *** 2016-05-15 20:31:15.492
 ERROR, tran=12.3.3589, ose=0:
 ORA-24756: transaction does not exist

 *** 2016-05-15 20:31:15.492
 ERROR, tran=12.3.3589, session#=1, ose=0:
 ORA-24756: transaction does not exist

 *** 2016-05-15 20:31:15.492
 ERROR, tran=12.3.3589, ose=0:
 ORA-24756: transaction does not exist

 *** 2016-05-15 20:31:15.492
 ERROR, tran=12.3.3589, ose=0:
 ORA-24756: transaction does not exist
 ————————>>
 ORA-01422: 实际返回的行数超出请求的行数, 这种问题可能与应用有关系,由于早上事情比较多,没有去查询具体原因,只参考如下资料解决了下, 因为我们部分操作是用的分布式交易 [通过 dblink]:
——————————————–>>
Symptoms:

 alert log:
 ORA-24756: transaction does not exist

 select local_tran_id,state from dba_2pc_pending;

 36.26.310445 collecting

 Cause:

 If the remote database no longer exists then the transaction will have to be
 purged from the list of pending distributed transactions.

 Solution:

 1,
 SQL> commit force ‘36.26.310445’; — session is hanged

ORA-24756: transaction does not exist 问题解决

 2,
 SQL> exec DBMS_TRANSACTION.PURGE_LOST_DB_ENTRY(‘36.26.310445’);
 BEGIN DBMS_TRANSACTION.PURGE_LOST_DB_ENTRY(‘36.26.310445’); END;

 *
 ERROR at line 1:
 ORA-30019: Illegal rollback Segment operation in Automatic Undo mode
 ORA-06512: at “SYS.DBMS_TRANSACTION”, line 65
 ORA-06512: at “SYS.DBMS_TRANSACTION”, line 85
 ORA-06512: at line 1
—>> 说明:然后运用 SecureCRT 以 sysdba 身份执行上述命令,成功,然后通过 oracle 级别和 linux 级别 kill 了步骤一中 hang 住的会话,过了一会儿通过 EM 查看 database 顶级活动,那 session 已经不在了,alert 日志中也不报类似 ORA-24756: transaction does not exist 的错误了。

ORA-24756: transaction does not exist 问题解决

3,
 SQL> commit;
 SQL> alter session set “_smu_debug_mode” = 4;
 SQL> commit;
 SQL> execute DBMS_TRANSACTION.PURGE_LOST_DB_ENTRY(‘local_tran_id’);
 SQL> commit;

 Relation Metalink doc:
 Doc 401302.1
 Doc 126069.1
 Doc 100664.1
 Doc 274321.1

——————————>> 至此,结束,引起问题的原因没去追究,只是去针对问题解决问题,没有联系应用多层次去处理,有待改善,后续有时间会明确补上。

更多 Oracle 相关信息见 Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12

本文永久更新链接地址 :http://www.linuxidc.com/Linux/2016-09/135022.htm

正文完
星哥玩云-微信公众号
post-qrcode
 0
星锅
版权声明:本站原创文章,由 星锅 于2022-01-22发表,共计2974字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。
【腾讯云】推广者专属福利,新客户无门槛领取总价值高达2860元代金券,每种代金券限量500张,先到先得。
阿里云-最新活动爆款每日限量供应
评论(没有评论)
验证码
【腾讯云】云服务器、云数据库、COS、CDN、短信等云产品特惠热卖中