Oracle 人為誤刪資料如何快速恢復

2022-07-09 04:39:15 字數 808 閱讀 1081

分享一下oracle誤刪資料短時間內恢復方法

1:-- 查詢sql歷史記錄  確定勿刪資料的時間點

select * from v$sqlarea t where t.parsing_schema_name ='表空間' and last_active_time>to_date('2020-10-22/15:00:11','yyyy-mm-dd hh24:mi:ss') and last_active_time<=to_date('2020-10-23/0:00:00','yyyy-mm-dd hh24:mi:ss') order by t.last_active_time desc

2:-- 開啟表的閃回功能

alter table表名 enable row movement;

3:-- 確認刪除時間點後,回滾資料

flashback  table 表名 to timestamp to_timestamp('2020-10-22/15:59:11','yyyy-mm-dd hh24:mi:ss');

4:-- 關閉表的閃回功能

alter table 表名 disable row movement;

如果上述方法不能恢復資料,盡快聯絡dba,將備份的資料來源備份出來減少損失,此方法在短時間適用,越早發現誤刪資料越好。

--查詢某錶多長時間前的資料並備份

select  * from 表名 as of timestamp>sysdate-1/24;

--備份

insert into 表名(

select  * from 表名 as of timestamp>sysdate-1/24;

Oracle誤刪表內資料,如何恢復

實際操作中,有時候會誤刪資料,下面是一些恢復資料的方法 1.flashback query 這裡只是查出被刪之前的資料,如果要恢復,則把查詢出來的資料匯出為sql,然後找到原表,重新匯入資料即可 閃回到15分鐘前 select from orders as of timestamp systimes...

ORACLE誤刪資料恢復

有很多原因導致了資料記錄的誤刪,怎樣恢復誤刪的記錄呢?先來看看這個概念 scn 系統改變號 它的英文全拼為 system change number 它是資料庫中非常重要的乙個資料結構。scn提供了oracle的內部時鐘機制,可被看作邏輯時鐘,這對於恢復操作是至關重要的 注釋 oracle 僅根據 ...

oracle誤刪資料恢復

oracle誤刪資料恢復 scn 系統改變號 它的英文全拼為 system change number 它是資料庫中非常重要的乙個資料結構。scn提供了oracle的內部時鐘機制,可被看作邏輯時鐘,這對於恢復操作是至關重要的 注釋 oracle 僅根據 scn 執行恢復。它定義了資料庫在某個確切時刻...