oracle数据库表中数据误更新回滚

可查询历史日志找到误更新的时间点

然后按接下来操作即可

-- 查看某个时间点的表的数据
select * from 表名 as of timestamp "TO_TIMESTAMP"('2020-06-09 16:22:13', 'yyyy-mm-dd hh24:mi:ss')
-- 开启闪回,如果不开启无法进行闪回
alter table 表名 enable row movement
-- 闪回表数据到某个时间点
flashback table 表名 to timestamp TO_TIMESTAMP('2020-06-09 16:22:13', 'yyyy-mm-dd hh24:mi:ss');
-- 关闭闪回,回滚数据之后需要进行关闭-- 
alter table 表名 disable row movement;

 

注意:回滚操作要即时,时间过长会报错(ORA-01555: 快照过旧: 回退段号 4 (名称为 "_SYSSMU4_2369290268$") 过小),无法回滚

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-29
  • 2021-03-28
  • 2021-10-29
  • 2021-07-04
  • 2022-12-23
猜你喜欢
  • 2021-11-01
  • 2022-12-23
  • 2022-12-23
  • 2021-11-03
  • 2021-11-25
  • 2021-05-02
  • 2021-05-24
相关资源
相似解决方案