使用nub恢復資料庫的知識擴充套件

記錄每一次錯誤發表於2018-12-19

1.NBU資料庫恢復指令碼

run {

allocate channel t1 type 'sbt_tape';

allocate channel t2 type 'sbt_tape';

allocate channel t3 type 'sbt_tape';

send 'NB_ORA_CLIENT=192.168.x.x';

send 'NB_ORA_SERV=nbu5230';

set until sequence 12 thread 1;

restore database;

#switch datafile all;

recover database;

release channel t1;

release channel t2;

release channel t3;

}

2.歸檔日誌恢復

run {

allocate channel t1 type 'sbt_tape';

allocate channel t2 type 'sbt_tape';

send 'NB_ORA_CLIENT=192.168.x.x';

send 'NB_ORA_SERV=nbu5230';

restore archivelog from sequence 8 until sequence 12 INCARNATION ALL;

release channel t1;

release channel t2;

}

3.其他恢復

更改還原路徑:

RMAN> set archivelog destination to '/u01/backup';

還原全部備份歸檔:

RMAN> restore archivelog all;

歸檔日誌範圍恢復:

RMAN> restore archivelog from sequence 8 until sequence 12;

RMAN> restore archivelog sequence between 8 and 12;

從低sequence開始恢復:

RMAN> restore archivelog from sequence 5;

RMAN> restore archivelog low sequence 5;

從高sequnece截止恢復:

RMAN> restore archivelog until sequence 110;

RMAN> restore archivelog high sequence 108;

按時間恢復:

RMAN> restore archivelog from time 'sysdate-7';


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

相關文章