flashback查询用于获取先前时间点的表行数据。当使用flashback查询时,需要在表名后指定as of timestamp 子句或as of scn子句,其中as of timestamp用于指定早期时间点,而as of scn 用于指定早期的scn值
select * from remind_message as of timestamp to_timestamp('201103070901','yyyymmdd hh24miss')
/
恢复之前删除id=1的记录
insert into remind_message
select *
from remind_message as of timestamp to_timestamp('201103070901','yyyymmdd hh24miss')
where id=1
flashback table
alter table remind_message enable row movement;
/
flashback table remind_message to timestamp to_timestamp('201103070901','yyyymmdd hh24miss');
--查看回收站的对象
show recyclebin
select ORIGINAL_NAME,object_NAME from recyclebin;
select owner,object_name,original_name from dba_recyclebin;
--清除回收站的对象
PURGE
--恢复数据库
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/25323853/viewspace-688567/
,如需转载,请注明出处,否则将追究法律责任。