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');


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM