How to detect and cleanup pending transactions in Oracle

2023-07-06   


Usually pending transactions clear up on their own. If not, read on.
   If you have a pending transaction that will not go away then check the pending states with the following query:
   SELECT local_tran_id, state, mixed
   FROM dba_2pc_pending;
   Pending transactions can be in any of the following states :
   collecting, committed, prepared, forced commit, forced rollback
   If the transaction is in the ‘prepared’ state then run
   COMMIT FORCE ‘’;
   or
   ROLLBACK FORCE ‘’;
   If the transaction is any state (other than ‘prepared’) and the transaction is not resolving then Log in as ‘SYS’ and run the following script
   exec dbms_transaction.purge_lost_db_entry();


相关内容:

  1. How to detect and cleanup pending transactions in Oracle
  2. 书写英语催款信 How to start your letter?
  3. How to spawning asynchronous work in J2EE
  4. 软件测试LoadRunner面试题:If you want to stop the execution of your script on error, how do you do that?
  5. How TDD works
  6. 软件测试LoadRunner面试题:How do you identify the performance bottlenecks