restore archivelog 的各种用法

备份所有归档日志文件

RMAN> backup archivelog all delete input;


第一: restore archivelog 的各种选项

1.restore archivelog all   恢复全部归档日志文件

RMAN> restore archivelog all;


2.只恢复 5到8这四个归档日志文件

RMAN> restore archivelog from logseq 5 until logseq 8;


3.恢复从第5个归档日志起

RMAN> restore archivelog from logseq 5;


4.恢复7天内的归档日志

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


5. sequence between 写法

RMAN> restore archivelog sequence between 1 and 3;


6.恢复到哪个日志文件为止

RMAN> restore archivelog until logseq 3;


7.从第五个日志开始恢复

RMAN> restore archivelog low logseq 5;


8.到第5个日志为止

RMAN> restore archivelog high logseq 5;


如果想改变恢复到另外路径下 则可用下面语句

set archivelog destination to 'd:\backup';

RMAN> run
 {allocate channel ci type disk;
 set archivelog destination to 'd:\backup';
 restore archivelog all;
  release channel ci;
 }

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26655292/viewspace-744234/,如需转载,请注明出处,否则将追究法律责任。

posted @ 2020-12-16 17:14  seasonzone  阅读(1311)  评论(0编辑  收藏  举报