2013年2月7日 星期四

Oracle DBA - ORA-01591 lock held by in-doubt distributed transaction

ORA-01591

Step 1. Select 'Rollback force '''||local_tran_id||'''' from sys.pending_trans$;
            Find out the local_tran_id.
Step 2. Try to commit or rollback.
            rollback force LOCAL_TRAN_ID;
            or  
            commit force LOCAL_TRAN_ID;
Step 3. If still error . then log in use sys and execute :
set transaction use rollback segment system;
delete from dba_2pc_pending where local_tran_id = LOCAL_TRAN_ID;
delete from pending_sessions$ where local_tran_id = LOCAL_TRAN_ID;
delete from pending_sub_sessions$ where local_tran_id = LOCAL_TRAN_ID;
commit;
rollback force LOCAL_TRAN_ID;  

沒有留言:

張貼留言