24756: transaction does not exist问题解决

今天在服务器看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

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的错误了。

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

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

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/eb823a43347e621f1d1c3adc5d16f5e8.html