DOYENSYS Knowledge Portal




We Welcome you to visit our DOYENSYS KNOWLEDGE PORTAL : Doyensys Knowledge Portal




Thursday, December 29, 2016

Fix Pending Distributed Transactions

Here is how to fix Pending Distributed Transactions

SELECT * FROM DBA_2PC_PENDING

  COUNT(*)
--------------
    1

select max(fail_time) from dba_2pc_pending;

MAX(FAIL_
--------------
03-DEC-16


select 'exec dbms_transaction.purge_lost_db_entry('''||local_tran_id||''' )' , 'commit;' from
dba_2pc_pending 'EXECDBMS_TRANSACTION.PURGE_LOST_DB_ENTRY('''||LOCAL_TRAN_ID||''')''COMMIT;'


exec dbms_transaction.purge_lost_db_entry('15.41.373682' )
commit;


select count(*) from DBA_2PC_PENDING ;

  COUNT(*)
-------------
         0

Done..!!

No comments: