您的位置:首页 > 博客中心 > 数据库 >

oracle 表数据恢复

时间:2022-03-14 04:26

对于表数据恢复,误删了表中数据时,一般不要再操作这个表了,按照下面的处理,即可把表中数据恢复过来。

场景:假设误删了表tabletest中的数据,则可用如下方法恢复表中数据

第一中方式:创建一个备份表,存放三小时前的数据

create table tabletest_2014bak nologging as 

select * from tabletest as of timestamp sysdate-21/24 where name != 'boat';

恢复3个小时前的数据

第二种方式:回复表tabletest中的数据到某一个时间点,这个时间点一定要前于当前时间

alter table tabletest enable row movement;

Flashback table tabletest to timestamp to_timestamp('2014-12-30 17:00:00','yyyy-mm-dd hh24:mi:ss');


 

 

热门排行

今日推荐

热门手游