Oracle資料庫不完全恢複

來源:互聯網
上載者:User

1、不能只對資料庫的一部分執行不完全恢複操作,因為這會使資料庫的一部分具有與這個資料庫其餘部分不同的系統更改號(SCN)或時間點。
 2、在run代碼塊中使用set命令與until time、until SCN或until sequence參數建立一個恢複目標。
 run
 {
 set until time "to_date('07/01/06 15:00:00','mm/dd/yy hh24:mi:ss')";
 restore database;
 recover database;
 alter database open resetlogs;
 }
 上面是一種方法,也可以選擇在restore和recover命令中直接使用until time、until SCN或until sequence參數,這樣就避免使用run代碼塊(這是一種更值得推薦的做法),見下一段代碼。
 3、基於時間點的恢複
 startup mount;
 restore database UNTIL TIME "to_date('07/01/06 15:00:00','mm/dd/yy hh24:mi:ss')";
 recover database UNTIL TIME "to_date('07/01/06 15:00:00','mm/dd/yy hh24:mi:ss')";
 alter database open resetlogs;
 4、基於SCN的恢複
 下面代碼將資料庫還原到SCN 10000,但是不包含這個SCN。
 startup mount;
 restore database UNTIL SCN 10000;
 recover database UNTIL SCN 10000;
 alter database open resetlogs;
 5、基於日誌序列的恢複
 下面代碼將資料庫還原到日誌序列為100,但是不包含這個日誌序列。
 startup mount;
 restore database UNTIL SEQUENCE 100 thread 1;
 recover database UNTIL SEQUENCE 100 thread 1;
 alter database open resetlogs;
 6、使用還原點恢複
 restore database until restore point TANGO_ONE;
 recover database until restore point TABGO_ONE;
 alter database open resetlogs;
 下面是使用run代碼塊和set命令建立目標還原點
 run
 {
 set restore point TANGO_ONE;
 restore database TANGO_ONE;
 recover database TANGO_ONE;
 }
 alter database open resetlogs;

推薦閱讀:

RMAN 配置歸檔日誌刪除策略

Oracle基礎教程之通過RMAN複製資料庫

RMAN備份策略制定參考內容

RMAN備份學習筆記

OracleDatabase Backup加密 RMAN加密

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.