1、记录Undo中所有提交和未commit的事务记录
2、例子:
查询未提交事务 select * from v$transaction;
查询已经提交的事务ID(某个表test上的事务)
a、delete from test where rownum<6;
b、select versions_xid,versions_operation,versions_starttime from test versions between timestamp sysdate-10 and maxvalue order by 3;
1 0400210071180000 D 03-6月 -10 08.05.34 下午
2 0400210071180000 D 03-6月 -10 08.05.34 下午
3 0400210071180000 D 03-6月 -10 08.05.34 下午
4 0400210071180000 D 03-6月 -10 08.05.34 下午
5 0400210071180000 D 03-6月 -10 08.05.34 下午
c、SELECT XID,undo_sql FROM Flashback_Transaction_Query t WHERE t.xid= '0400210071180000';
1 0400210071180000 insert into "HELIOS"."TEST"("ID") values ('26'); 2 0400210071180000 insert into "HELIOS"."TEST"("ID") values ('51'); 3 0400210071180000 insert into "HELIOS"."TEST"("ID") values ('39'); 4 0400210071180000 insert into "HELIOS"."TEST"("ID") values ('25'); 5 0400210071180000 insert into "HELIOS"."TEST"("ID") values ('3');