這篇文章將為大家詳細(xì)講解有關(guān)如何使用nub恢復(fù)數(shù)據(jù)庫(kù),小編覺(jué)得挺實(shí)用的,因此分享給大家做個(gè)參考,希望大家閱讀完這篇文章后可以有所收獲。
1.NBU數(shù)據(jù)庫(kù)恢復(fù)腳本
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.歸檔日志恢復(fù)
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.其他恢復(fù)
更改還原路徑:
RMAN> set archivelog destination to '/u01/backup';
還原全部備份歸檔:
RMAN> restore archivelog all;
歸檔日志范圍恢復(fù):
RMAN> restore archivelog from sequence 8 until sequence 12;
RMAN> restore archivelog sequence between 8 and 12;
從低sequence開(kāi)始恢復(fù):
RMAN> restore archivelog from sequence 5;
RMAN> restore archivelog low sequence 5;
從高sequnece截止恢復(fù):
RMAN> restore archivelog until sequence 110;
RMAN> restore archivelog high sequence 108;
按時(shí)間恢復(fù):
RMAN> restore archivelog from time 'sysdate-7';
關(guān)于“如何使用nub恢復(fù)數(shù)據(jù)庫(kù)”這篇文章就分享到這里了,希望以上內(nèi)容可以對(duì)大家有一定的幫助,使各位可以學(xué)到更多知識(shí),如果覺(jué)得文章不錯(cuò),請(qǐng)把它分享出去讓更多的人看到。