Posted by: Edi Yanto on: May 31, 2011
If you have rows on the view DBA_2PC_PENDING, do the below actions (Just enter the TRANSACTION ID, got from the ORA-1591 error):
Connect as SYS or SYSDBA
DELETE FROM pending_trans$ WHERE local_tran_id = ‘&TRANSACTION_ID’;
DELETE FROM pending_sessions$ WHERE local_tran_id = ‘&TRANSACTION_ID’;
If you don’t have rows on the view DBA_2PC_PENDING, do the below actions (insert dummy rows into SYS.PENDING_TRANS$, and SYS.PENDING_SESSIONS$ tables to correct this, and just enter the TRANSACTION ID, got from the ORA-1591 error):
Connect AS SYS OR SYSDBA
ALTER SYSTEM DISABLE DISTRIBUTED RECOVERY;
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 (‘&TRANSACTION_ID’,
306206, /* */
‘XXXXXXX.12345.1.2.3′, /* These values can be used without any */
‘prepared’,
‘P’, /* modification. Most of the values are */
HEXTORAW (’00000001′), /* constant. */
HEXTORAW (’00000000′), /* */
0,
SYSDATE,
SYSDATE);INSERT INTO pending_sessions$
VALUES (‘&TRANSACTION_ID’,
1,
HEXTORAW (’05004F003A1500000104′),
‘C’,
0,
30258592,
”,
146);
COMMIT;
ROLLBACK FORCE ‘&TRANSACTION_ID’; /* or commit force */
COMMIT;
ALTER SYSTEM ENABLE DISTRIBUTED RECOVERY;
EXEC dbms_transaction.purge_lost_db_entry( ‘&TRANSACTION_ID’ );
COMMIT;
DELETE FROM pending_trans$ WHERE local_tran_id = ‘&TRANSACTION_ID’;
DELETE FROM pending_sessions$ WHERE local_tran_id = ‘&TRANSACTION_ID’;
COMMIT;
The following tables indicates what the various states indicate about the distributed transaction what the administrator’s action should be:
Recent Comments