RMAN備份及恢復歸檔日誌的語法

shilei1發表於2012-08-09
一.備份所有歸檔日誌檔案
   RMAN> backup archivelog all delete input;
二: restore archivelog 的各種選項
   1.恢復全部歸檔日誌檔案
     RMAN> restore archivelog all;
   2.只恢復5到8這四個歸檔日誌檔案
     RMAN> restore archivelog from logseq 5 until logseq 8;
   3.恢復從第5個歸檔日誌起
     RMAN> restore archivelog from logseq 5;
   4.恢復7天內的歸檔日誌
     RMAN> restore archivelog from time 'sysdate-7';
   5. sequence between 寫法
     RMAN> restore archivelog sequence between 1 and 3;
   6.恢復到哪個日誌檔案為止
     RMAN> restore archivelog until logseq 3;
   7.從第五個日誌開始恢復
     RMAN> restore archivelog low logseq 5;
   8.到第5個日誌為止
     RMAN> restore archivelog high logseq 5;
三:如果想改變恢復到另外路徑下 則可用下面語句
   set archivelog destination to 'd:\backup';

   RMAN> run
   2> {allocate channel ci type disk;
   3> set archivelog destination to 'd:\backup';
   4> restore archivelog all;
   5> release channel ci;
   6> }

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/196700/viewspace-740541/,如需轉載,請註明出處,否則將追究法律責任。

相關文章