run {
allocate channel ch00 type 'sbt_tape';
restore archivelog like '%arch_2%' ;
release channel ch00;
}
或这种方式:
run {
allocate channel ch00 type 'sbt_tape';
restore archivelog from logseq 3000 until logseq 5000 ;
release channel ch00;
}
要查找恢复什么条件的archivelog可以用以下脚本查询:
rman catalog
rman/rman@recvdb target
sys/sys@prod msglog=/u01/rman_scripts/listbackup.list<
list backup;
exit
EOF
在listbackup.list里可以看到你需要恢复的archivelog。
在OPS/RAC中,必须有thread标志才能查到归档日志的关系,如下:
run {
allocate channel ch00 type 'sbt_tape';
restore archivelog from logseq 3000 until logseq 5000 thread 2;
release channel ch00;
}
本文作者:网友 来源:网络http://blog.chinaunix.net/u/10516/
CIO之家 www.ciozj.com 微信公众号:imciow