oracle数据库执行delete后的数据回滚
一:根据时间来恢复:
1、查询数据库当前时间(目的是为了检查数据库时间是否与你电脑时间相近,避免时间不同而将数据恢复到错误时间点)
select to_char(sysdate,'yyyy-mm-dd hh24:mi:ss') from dual;
2、查询删除数据时间点之前的数据
select * from 表名 as of timestamp to_timestamp('2016-08-11 16:12:11','yyyy-mm-dd hh24:mi:ss');
3、恢复数据(激动人心的时刻)
flashback table 表名 to timestamp to_timestamp('2016-08-11 16:12:11','yyyy-mm-dd hh24:mi:ss');
大功告成,数据恢复成功;
但是也可能会出现问题,比如报错:ORA-08189:未启用行移动功能,不能闪回表;
不要怕,这个很简单;
alter table 表名 enable row movement;
本文来自博客园,作者:King-DA,转载请注明原文链接:https://www.cnblogs.com/qingmuchuanqi48/articles/15054315.html

浙公网安备 33010602011771号