oracle update误操作 恢复

第一步:在v$sqlarea 这视图里面找到你操作那条SQL的时间;
select r.FIRST_LOAD_TIME,r.* from v$sqlarea r order by r.FIRST_LOAD_TIME desc ;
第二步:
create table t_table_recove --新表
as
select * from t_table--你操作的那张表
as of timestamp to_timestamp('2010-06-02 11:36:53','yyyy-mm-dd hh24:mi:ss');

 

下面进行重命名表的操作

rename t_test to t_test_2;
rename t_test_1 to t_test;

 

 

 

FLASHBACK TABLE test TO TIMESTAMP TIMESTAMP '2010-3-18 10:00:00';
这要求TEST表事先有ENABLE ROW MOVEMENT.

或者把旧数据找出来然后手工写回去:
SELECT * FROM test AS OF TIMESTAMP TIMESTAMP '2010-3-18 10:00:00';

 

update wl_notify_task t1
set t1.parameter =
(select parameter
from wl_notify_task AS OF TIMESTAMP SYSDATE – 3 / 1440
where t1.id = id)

 

误更新或者删除

alter table ch_t_song_info enable row movement;
flashback table ch_t_song_info to timestamp to_timestamp('2013-11-27 14:00:00','yyyy-mm-dd hh24:mi:ss');

 

误drop

flashback table ch_t_song_info to before update

 

http://www.tuicool.com/articles/MfQJ3u

http://blog.itpub.net/12778571/viewspace-553469/

http://renjie120.iteye.com/blog/648858

 

原文地址:https://www.cnblogs.com/liuzhuqing/p/7480227.html