- 查詢誤操作錶的歷史數據信息(此步用於查看可回滾的日期,可選擇最近的正確數據日期進行回滾)
select * from 表名 as of timestamp to_timestamp('2019-08-23 17:15:00', 'yyyy-mm-dd hh24:mi:ss');
- 開啓數據可移動命令
alter table 表名 enable row movement;
- 查看數據閃回功能是否開啓
select open_mode,log_mode,flashback_on from v$database;
- 回滾誤操作表指定日期的數據
flashback table 表名 to timestamp to_timestamp('2019-08-23 17:15:00', 'yyyy-mm-dd hh24:mi:ss');
如果發生誤操作表數據,請儘可能在數小時內使用上述方法進行回滾,週期過長,將無法操作。