ORA-02062: distributed recovery received DBID xxx, expected xxy – wycofanie transakcji

błąd:

Errors in file /u01/diag/rdbms/baza/baza/trace/baza_reco_20054068.trc:
ORA-02062: distributed recovery received DBID xxx, expected xxy

— sprawdzenie oczekujących transakcji

SELECT LOCAL_TRAN_ID, GLOBAL_TRAN_ID, STATE, MIXED, COMMIT# FROM DBA_2PC_PENDING;

— jezeli status prepaired to wycofujemy, albo commitujemy (LOCAL_TRAN_ID):

ROLLBACK FORCE '107.16.2563092′;
COMMIT FORCE '107.16.2563092′;

— albo:

DELETE FROM SYS.PENDING_TRANS$ WHERE LOCAL_TRAN_ID = '107.16.2563092′;
DELETE FROM SYS.PENDING_SESSIONS$ WHERE LOCAL_TRAN_ID =’107.16.2563092′ ;
DELETE FROM SYS.PENDING_SUB_SESSIONS$ WHERE LOCAL_TRAN_ID = '107.16.2563092′;

— jeżeli status collecting to usuwamy (LOCAL_TRAN_ID):

EXECUTE DBMS_TRANSACTION.PURGE_LOST_DB_ENTRY(’107.16.2563092′);

— dodatkowo, jeżeli nie znajdziemy transakcji w DBA_2PC_PENDING
— X$KTUXE [K]ernel [T]ransaction [U]ndo Transa[X]tion [E]ntry
— jak polaczymy kolumny to wyjdzie nam ID KTUXEUSN.KTUXESLT.KTUXESQN

select KTUXEUSN, KTUXESLT, KTUXESQN from X$KTUXE;