oracle資料回滾

2021-07-15 17:49:17 字數 385 閱讀 6719

當我們修改了表的資料並且提交了事務後,想回滾資料怎麼辦?

先根據sql執行歷史確定資料回滾時間點:

select sql_text,last_load_time from v$sql where sql_text like '%update%' order by last_load_time desc;
再將資料回滾到需要的時間點:
alter table tablename enable row movement;

flashback table tablename to timestamp to_timestamp('***x-xx-xx xx:xx:xx', 'yyyy-mm-dd hh24:mi:ss');

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...

Oracle資料回滾

今天差一點刪庫跑路 還好有乙個回滾 嚇死 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 ...