您的位置:首页 > 数据库 > Oracle

oracle 恢复删除的表数据

2016-07-19 10:43 561 查看
--1、查询当前系统时间

select to_char(sysdate,'yyyy-mm-dd hh24:mi:ss') from dual;

--2、查询删除数据的时间点的数据

--(如果不是,则继续缩小范围)

    

select * from t_weixin_gzshf as of timestamp to_timestamp('2016-06-13 10:05:50','yyyy-mm-dd hh24:mi:ss');

alter table t_weixin_gzshf enable row movement;



--3、恢复删除且已提交的数据


--注意:如果在执行上面的语句,出现错误。可以尝试执行 alter table 表名 enable row movement; //允许更改时间戳



flashback table t_weixin_gzshf to timestamp to_timestamp('2016-06-13 10:05:50','yyyy-mm-dd hh24:mi:ss');
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: