oracle 误删数据后恢复数据
1.查询删除数据时间点之前的数据
闪回:根据时间恢复表数据、查看表数据;查看某个时间点之前的表数据
select * from 表名 as of timestamp to_timestamp(‘2021-03-18 10:12:11’,‘yyyy-mm-dd hh24:mi:ss’);
(若没有数据 ,可时间继续提前查询)
2.利用flashback table恢复表到过去某一时刻
flashback table 表名 to timestamp to_timestamp(‘2021-03-18 10:12:11’,‘yyyy-mm-dd hh24:mi:ss’);
注:如报错:ORA-08189:未启用行移动功能,不能闪回表
alter table 表名 enable row movement;
执行上面SQL即可