有时dg或某些操作需要,得把备份走的归档恢复出来,借助rman 的restore archivelog 命令很方便。
参考语法:
如果要指定位置则
-
rman target /
-
run
-
{
-
set archivelog destination to '/tmp/arc/';
-
restore archivelog sequence 123456;
-
}
-
或者
-
run
-
{
-
allocate channel c1 type 'sbt_tape';
-
set archivelog destination to '/tmp/arc/';
-
restore archivelog from logseq=47957 until logseq=47962 thread=2; #这应该是老语法,不推荐使用
-
restore archivelog sequence between 1 and 3 thread=1;
-
release channel c1;
-
}
提取完后传输到备库,然后注册一下:
sql> alter database register logfile '/tmp/oldarc/123456.arc';
如果有很多归档需要注册
rman> catalog start with '/u01/oldarc/';
阅读(783) | 评论(0) | 转发(0) |