咬定青山不放松,立根原在破岩中!
ECRZ 记录美好事物。
Oracle数据库误操作回滚
1.查询执行时间
SELECT
versions_xid,
versions_operation,
versions_starttime,
versions_endtime
FROM
TD_SM_USER[表名] versions BETWEEN timestamp minvalue
AND maxvalue;
2.查看当前时间表数据
select * from TD_SM_USER as of timestamp to_timestamp('2021-11-26 19:42:52', 'yyyy-mm-dd hh24:mi:ss');
3.激活服务
alter table TD_SM_USER enable row movement;
4.将表数据还原到指定时间
flashback table TD_SM_USER to timestamp TO_TIMESTAMP('2021-11-26 19:42:52', 'yyyy-mm-dd hh24:mi:ss');