某项目逻辑备份报错
ORA-31693: Table data object "amf"."TVON7LOG" failed to load/unload and is being skipped due to error:
ORA-02354: error in exporting/importing data
ORA-01591: lock held by in-doubt distributed transaction 22.26.10043216
检查dba_2pc_pending视图发现
对于state状态一般有三种rollback 、prepared 、commit、collecting
根据mos2081894.1 对30个事务进行处理
To resolve the issue please execute the following action plan
Purging the transactions may not work
SQL> execute DBMS_TRANSACTION.PURGE_LOST_DB_ENTRY('640.135.3086');
BEGIN DBMS_TRANSACTION.PURGE_LOST_DB_ENTRY('640.135.3086'); END;
*
ERROR at line 1:
ORA-06510: PL/SQL: unhandled user-defined exception
ORA-06512: at "SYS.DBMS_TRANSACTION", line 105
ORA-06512: at line 1
Use the following query to check for any pending transactions
SQL> SELECT local_tran_id FROM dba_2pc_pending;
LOCAL_TRAN_ID
----------------------
640.135.3086
Use the following workaround to clear the pending transactions or lock held by in-doubt distributed transactions by executing Rollback force
and purge
SQL> rollback force '640.135.3086';
Rollback complete.
SQL> commit;
Commit complete.
SQL> begin
2 dbms_transaction.purge_lost_db_entry('640.135.3086');
3 end;
4 /PL/SQL procedure successfully completed.
SQL> SELECT * FROM dba_2pc_pending;
no rows selected
SQL> commit;
Commit complete.
SQL> SELECT * FROM dba_2pc_pending;
no rows selected