Oracle資料回滾

2022-09-13 01:09:14 字數 417 閱讀 5907

今天差一點刪庫跑路 還好有乙個回滾 嚇死

1. 查詢某個時間點的資料

select * from table  as of timestamp to_timestamp('2019-12-24 00:00:00', 'yyyy-mm-dd hh24:mi:ss');

2. 開啟資料閃回

alter table table(此為表名)  enable row movement;

3.將資料閃回到某個時間點

flashback table table(此為表名) to timestamp to_timestamp('2019-12-24 00:00:00', 'yyyy-mm-dd hh24:mi:ss');

4.關閉資料回滾

alter table table disable row movement

oracle資料回滾

當我們修改了表的資料並且提交了事務後,想回滾資料怎麼辦?先根據sql執行歷史確定資料回滾時間點 select sql text,last load time from v sql where sql text like update order by last load time desc 再將資料...

Oracle資料回滾

select from 表名 as of timestamp to timestamp 2019 04 15 22 00 38 yyyy mm dd hh24 mi ss alter table 表名 enable row movement alter table 表名 disable row mo...

Oracle資料回滾

1 select from 表名 as oftimestamp to timestamp 2019 04 15 22 00 38 yyyy mm dd hh24 mi ss 1 select 2 from 表名 as oftimestamp to timestamp 2019 04 16 21 43...