oracle误执行update提交事务后,回滚数据

--1、找到自己执行update语句的时间
select r.FIRST_LOAD_TIME,r.* from v$sqlarea r where sql_text like '%update yzxdcfmx a set a.neir=(select%' order by r.FIRST_LOAD_TIME desc ;

--2、查询该时间点的数据,是否为执行update前数据
select * from yzxdcfmx as of timestamp to_timestamp('2020-08-14/17:07:10', 'yyyy-mm-dd hh24:mi:ss')

--3、执行下面两条SQL,即可将数据恢复到执行update之前
alter table yzxdcfmx enable row movement;
flashback table yzxdcfmx to timestamp to_timestamp('2020-08-14/17:07:10', 'yyyy-mm-dd hh24:mi:ss');

posted @ 2021-02-05 14:53  绿水青山777  阅读(1026)  评论(0编辑  收藏  举报