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

oracle数据回滚

2016-07-27 23:15 387 查看
当我们修改了表的数据并且提交了事务后,想回滚数据怎么办?

先根据SQL执行历史确定数据回滚时间点:

select sql_text,last_load_time from v$sql where sql_text like '%update%' order by last_load_time desc;
再将数据回滚到需要的时间点:
alter table tablename enable row movement;
flashback table tablename to timestamp to_timestamp('xxxx-xx-xx xx:xx:xx', 'yyyy-mm-dd hh24:mi:ss');
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: