Oracle RMAN备份及恢复归档日志的语法

教程发布:风哥 教程分类:ITPUX技术网 更新日期:2022-02-12 浏览学习:173

Oracle RMAN备份及恢复归档日志的语法

[color=#454545][font=tahoma, helvetica, arial]一.备份所有归档日志文件
[color=#454545][font=tahoma, helvetica, arial] RMAN> backup archivelog all delete input;

[color=#454545][font=tahoma, helvetica, arial]二: restore archivelog 的各种选项
[color=#454545][font=tahoma, helvetica, arial] 1.恢复全部归档日志文件
[color=#454545][font=tahoma, helvetica, arial] RMAN> restore archivelog all;
[color=#454545][font=tahoma, helvetica, arial] 2.只恢复5到8这四个归档日志文件
[color=#454545][font=tahoma, helvetica, arial] RMAN> restore archivelog from logseq 5 until logseq 8;
[color=#454545][font=tahoma, helvetica, arial] 3.恢复从第5个归档日志起
[color=#454545][font=tahoma, helvetica, arial] RMAN> restore archivelog from logseq 5;
[color=#454545][font=tahoma, helvetica, arial] 4.恢复7天内的归档日志
[color=#454545][font=tahoma, helvetica, arial] RMAN> restore archivelog from time 'sysdate-7';
[color=#454545][font=tahoma, helvetica, arial] 5. sequence between 写法
[color=#454545][font=tahoma, helvetica, arial] RMAN> restore archivelog sequence between 1 and 3;
[color=#454545][font=tahoma, helvetica, arial] 6.恢复到哪个日志文件为止
[color=#454545][font=tahoma, helvetica, arial] RMAN> restore archivelog until logseq 3;
[color=#454545][font=tahoma, helvetica, arial] 7.从第五个日志开始
[color=#454545][font=tahoma, helvetica, arial] RMAN> restore archivelog low logseq 5;
[color=#454545][font=tahoma, helvetica, arial] 8.到第5个日志为止
[color=#454545][font=tahoma, helvetica, arial] RMAN> restore archivelog high logseq 5;

[color=#454545][font=tahoma, helvetica, arial]三:如果想改变恢复到另外路径下 则可用下面语句
[color=#454545][font=tahoma, helvetica, arial] set archivelog destination to 'd:\backup';

[color=#454545][font=tahoma, helvetica, arial] RMAN> run
[color=#454545][font=tahoma, helvetica, arial] 2> {allocate channel ci type disk;
[color=#454545][font=tahoma, helvetica, arial] 3> set archivelog destination to 'd:\backup';
[color=#454545][font=tahoma, helvetica, arial] 4> restore archivelog all;
[color=#454545][font=tahoma, helvetica, arial] 5> release channel ci;
[color=#454545][font=tahoma, helvetica, arial] 6> }

[color=#454545][font=tahoma, helvetica, arial]四: rac环境下只恢复5到8这四个归档日志文件[color=#454545][font=tahoma, helvetica, arial]RMAN> restore archivelog from logseq 5 until logseq 8 thread 1;

本文标签:
网站声明:本文由风哥整理发布,转载请保留此段声明,本站所有内容将不对其使用后果做任何承诺,请读者谨慎使用!
【上一篇】
【下一篇】