闪回事务查询+闪回事务查询案例

xiaoxiao2021-02-28  92

闪回事务查询 1闪回事务查询是闪回版本查询的一个扩充 2闪回事务查询可以审计某个事务或者撤销一个已经提交的事务

闪回事务查询案例

测试数据

create table sct4( id number(4), name varchar2(20) ); insert into sct4 values(1,'lili'); commit; insert into sct4 values(2,'lilic'); commit; delete sct4 where id=1; commit; --列格式 set linesize 200; column id format 99; column name format a20; column versions_xid format a20; column versions_operation format a10; column versions_starttime format a25; column versions_endtime format a25; column xid format a20; column operation format a20; column table_name format a20; column undo_sql format a20;

获取事务的xid

select id, name,versions_xid,versions_operation,versions_starttime,versions_endtime from sct4 versions between timestamp minvalue and maxvalue order by id,versions_endtime;

对应事务的闪回事务查询

撤销对应事务

转载请注明原文地址: https://www.6miu.com/read-35194.html

最新回复(0)