ORA-24756: transaction does not exist問題解決

dawn009發表於2014-05-16
早上看alert日誌發現報錯如下:
---------------------------------------------------- >>
Fri May 16 02:55:05 2014
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內容如下:
------------------------------------------------------&gt>
*** 2014-05-15 20:31:15.492
*** SESSION ID:(576.1) 2014-05-15 20:31:15.492
*** CLIENT ID:() 2014-05-15 20:31:15.492
*** SERVICE NAME:(SYS$BACKGROUND) 2014-05-15 20:31:15.492
*** MODULE NAME:() 2014-05-15 20:31:15.492
*** ACTION NAME:() 2014-05-15 20:31:15.492
 
*** TRACE FILE RECREATED AFTER BEING REMOVED ***

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

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

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

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

*** 2014-05-15 20:31:15.492
ERROR, tran=12.3.3589, ose=0:
ORA-24756: transaction does not exist
------------------------&gt>
ORA-01422: 實際返回的行數超出請求的行數,這種問題可能與應用有關係,由於早上事情比較多,沒有去查詢具體原因,只參考如下資料解決了下,因為我們部分操作是用的分散式交易[透過dblink]:
--------------------------------------------&gt>
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

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
---&gt>說明:然後運用SecureCRT以sysdba身份執行上述命令,成功,然後透過oracle級別和linux級別kill了步驟一中hang住的會話,過了一會兒透過EM檢視database頂級活動,那session已經不在了,alert日誌中也不報類似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

------------------------------&gt>至此,結束,引起問題的原因沒去追究,只是去針對問題解決問題,沒有聯絡應用多層次去處理,有待改善,後續有時間會明確補上。

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29119536/viewspace-1162548/,如需轉載,請註明出處,否則將追究法律責任。

相關文章