ORACLE 表数据误删如何恢复,delete之后已提交事务?
第一步:
查询到某个时间点的数据
SELECT
* from 表名 as of timestamp to_timestamp('2022-12-26 13:57:00','yyyy-mm-dd hh24:mi:ss') where ID < 800;
第二步:
insert到表中即可
select * from 表名 order by ID desc ;
insert into 表名(所有列) SELECT
* from 表名 as of timestamp to_timestamp('2022-12-26 13:57:00','yyyy-mm-dd hh24:mi:ss') where ID < 800;
第三步:
提交事务
示例:利用idea的带的工具进行操作,对钩提交事务
delete之后,Oracle会保留相关日志一段时间,如果超过默认时间,则无法恢复!!!