查询最近历史操作
select
*
from
v$sqlarea a
where
last_active_time>to_date('2022/04/07 11:45:00', 'yyyy-mm-dd hh24:mi:ss')
and a.sql_text like '%delete%'
and a.SQL_TEXT like '%inp_bill_detail%';
select
*
from
v$sql a
where
a.first_load_time > date'2022-02-10'
and a.sql_text like '%0602592649%'
and a.SQL_TEXT like '%inp_bill_detail%';
查询恢复某个时间点的数据
1.查看此表在某一时间点的数据
select * from 表名 as of timestamp to_timestamp(‘删除时间点’,‘yyyy-mm-dd hh24:mi:ss’);
2.开启表的行移动
alter table 表名 enable row movement;
3.恢复数据
flashback table 表名 to timestamp to_timestamp(‘2007-2-12 12:00:00’,‘yyyy-mm-dd hh24:mi:ss’);
4.关闭行移动
alter table 表名 disable row movement;
