dba_2pc_pending 中有21条几年前的事务,想清除,这样行不行?

来源:互联网 发布:一笔签名设计软件 编辑:程序博客网 时间:2024/05/16 23:21
dba_2pc_pending 中有21条几年前的事务,想清除,请大家帮忙
看看下面的方法行不行!

A: Cleanup Steps: Before you begin, make note of the local transaction ID,, from the error message reported.
1. Determine if you want to attempt a commit or rollback of this transaction. You can do the following select to help determine what action to take:
SQL>; select state, advice from dba_2pc_pending where
local_tran_id = "";
2. Commit or rollback the transaction. To commit: SQL>; commit force ““; To rollback:
SQL>; rollback force ““;
3. If your are using release 7.3.x or greater and Step 1 above fails, execute the following command in either Server Manager or SQL*Plus: SQL>; execute dbms_transaction.purge_lost_db_entry(““);
NOTE: The purge_lost_db_entry function is fully documented in the "dbmsutil.sql" script located in the "$ORACLE_HOME/rdbms/admin" directory.
4. If running a release below 7.3 -OR- both Steps 1 and 2 above have failed, do the following: Connect to Server Manager or SQL*Plus and execute the following commands:
SQL>; set transaction use rollback segment system;
SQL>; delete from dba_2pc_pending where local_tran_id = ““;
SQL>; delete from pending_sessions$ where local_tran_id = ““;
SQL>; delete from pending_sub_sessions$ where local_tran_id = ““;
SQL>; commit;

在我的数据库中,是第4种情况,直接delete安全吗? 
原创粉丝点击