while trying to commit distibuted transaction faced with «free global transaction table entry»
solution foud at mos 549307.1
define local_tran_id:
1 2 3 4 5 6 | var numtransact varchar2(100) begin :numtransact:='5.31.1099960'; end; / |
use mos note to force commit transaction:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | set transaction use rollback segment SYSTEM; delete from sys.pending_trans$ where local_tran_id = :numtransact; delete from sys.pending_sessions$ where local_tran_id = :numtransact; delete from sys.pending_sub_sessions$ where local_tran_id = :numtransact; commit ; insert into pending_trans$ ( LOCAL_TRAN_ID, GLOBAL_TRAN_FMT, GLOBAL_ORACLE_ID, STATE, STATUS, SESSION_VECTOR, RECO_VECTOR, TYPE#, FAIL_TIME, RECO_TIME) values ( :numtransact, 306206, 'XXXXXXX.12345.1.2.3' , 'prepared' , 'P' , hextoraw( '00000001' ), hextoraw( '00000000' ), 0, sysdate, sysdate ); insert into pending_sessions$ values ( :numtransact, 1, hextoraw( '05004F003A1500000104' ), 'C' , 0, 30258592, '' , 146 ); commit ; begin DBMS_TRANSACTION.COMMIT_FORCE (:numtransact); commit ; end ; / |
transaction state changed to forced commit ( or commit forced =) ), after that purge transcation entry
1 | exec DBMS_TRANSACTION.PURGE_LOST_DB_ENTRY( '5.31.1099960' ); --local tran id |