0900130035060000 1939857 U 7369 100.00
1939857 7369 800.00
7499 1600.00
7521 1250.00
(篇幅所限,有删减…..)
15 rows selected
提供的undo_sql,是可以直接执行的。
SQL> update "SYS"."TEST" set "SAL" = '800' where ROWID = 'AAAV4EAABAAARfpAAA';
1 row updated
SQL> commit;
Commit complete
SQL> select versions_xid xid,versions_startscn, versions_endscn, versions_operation, test.* from test versions between scn minvalue and maxvalue;
XID VERSIONS_STARTSCN VERSIONS_ENDSCN VERSIONS_OPERATION EMPNO SAL
---------------- ----------------- --------------- ------------------ ----- ---------
07000500D6050000 1940037 U 7369 800.00
0900130035060000 1939857 1940037 U 7369 100.00
1939857 7369 800.00
7499 1600.00
最后确定一下数据行和事务关系。
SQL> delete test;
14 rows deleted
SQL> select xid from v$transaction;
XID
----------------
060016002F060000 –事务XID
SQL> commit;
Commit complete
每条对应数据行,都存在与flashback_transaction_query中。
SQL> select xid, start_scn, commit_scn, row_id, operation,undo_sql from flashback_transaction_query where table_owner='SYS' and table_name='TEST';
XID START_SCN COMMIT_SCN ROW_ID OPERATION UNDO_SQL
---------------- ---------- ---------- ------------------- -------------------------------- --------------------------------------------------------------------------------
060016002F060000 1940047 1940079 AAAV4EAABAAARfpAAN DELETE insert into "SYS"."TEST"("EMPNO","SAL") values ('7934','1300');
060016002F060000 1940047 1940079 AAAV4EAABAAARfpAAM DELETE insert into "SYS"."TEST"("EMPNO","SAL") values ('7902','3000');
060016002F060000 1940047 1940079 AAAV4EAABAAARfpAAL DELETE insert into "SYS"."TEST"("EMPNO","SAL") values ('7900','950');