RMAN> run
2> {
3> set archivelog destination to ‘/tmp‘;
4> restore archivelog sequence 142 thread 2;
5> }
executing command: SET ARCHIVELOG DESTINATION
Starting restore at 2015-03-12 00:22:25
using channel ORA_DISK_1
archived log for thread 2 with sequence 142 is already on disk as file +FRA/rac/archivelog/2015_03_11/thread_2_seq_142.717.874033939
restore not done; all files read only, offline, or already restored
Finished restore at 2015-03-12 00:22:25
注,这里因为原本的归档日志还存在,导致restore archivelog到/tmp下失败。
如果log_archive_dest_1或log_archive_dest未设置,归档日志默认放到闪回区。如果要restore的归档日志在闪回区还存在的话,则无法restore。
手工去除后,restore到/tmp了
RMAN> delete archivelog sequence 142 thread 2;
RMAN> run
2> {
3> set archivelog destination to ‘/tmp‘;
4> restore archivelog sequence 142 thread 2;
5> }
[grid@rac1 ~]$ ll -ltar /tmp
total 48904
drwx------ 2 root root 4096 Sep 21 15:54 keyring-PiyxKA
。。。
-rw-r----- 1 oracle asmadmin 49039872 Mar 12 00:24 2_142_870389881.dbf
本文出自 “王师傅” 博客,请务必保留此出处http://johnnywong.blog.51cto.com/1997751/1619409
Restore archivelog from ASM to filesystem
原文地址:http://johnnywong.blog.51cto.com/1997751/1619409