表闪回操作

1、表闪回查询
select * from 表名 as of timestamp to_timestamp('2023-08-04 15:25:00', 'yyyy-mm-dd hh24:mi:ss');

2、表闪回
(1)开启表闪回
alter table 表名 enable row movement;
(2)闪回表数据到某个时间点
flashback table 表名 to timestamp TO_TIMESTAMP('2023-08-04 15:25:00', 'yyyy-mm-dd hh24:mi:ss');
(3)关闭表闪回
alter table 表名 disable row movement;

(4)闪回drop的表
flashback table 表名 to before drop;
flashback table 表名 to before drop rename to 新表名;

posted @ 2023-08-04 15:45  武汉OracleDBA  阅读(18)  评论(0编辑  收藏  举报