restore archivelog 的用法
2016-07-21 19:13
363 查看
1.备份所有归档日志文件
RMAN> backup archivelog all delete input;
第二: restore archivelog 的各种选项
0.根据rac线程restore archivelog from logseq 6160 thread 2;
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;
6.从第五个日志开始恢复
RMAN> restore archivelog low logseq 5;
7.到第5个日志为止
RMAN> restore archivelog high logseq 5;
如果想改变恢复到另外路径下 则可用下面语句
set archivelog destination to 'd:\backup';
RMAN> run
2> {allocate channel ci type disk;
3> set archivelog destination to 'd:\backup';
4> restore archivelog all;
5> release channel ci;
6> }
8.根据时间查看需要的备份集:
ERPDB1@/orabak>rman target /
RMAN> list backup of archivelog time between
"to_date('2009-06-24 08:00:00','yyyy-mm-dd hh24:mi:ss')" and
"to_date('2009-06-24 13:00','yyyy-mm-dd hh24:mi:ss')";
恢复指定时间段
RMAN> run {
2> set archivelog destination to
'/orabak/testarch';
3> SQL 'ALTER SESSION SET
NLS_DATE_FORMAT="YYYY-MM-DD:HH24:MI:SS"';
4> restore archivelog time between '2009-06-24
09:00:00' and '2009-06-24 12:10:00';
5> }
RMAN> backup archivelog all delete input;
第二: restore archivelog 的各种选项
0.根据rac线程restore archivelog from logseq 6160 thread 2;
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;
6.从第五个日志开始恢复
RMAN> restore archivelog low logseq 5;
7.到第5个日志为止
RMAN> restore archivelog high logseq 5;
如果想改变恢复到另外路径下 则可用下面语句
set archivelog destination to 'd:\backup';
RMAN> run
2> {allocate channel ci type disk;
3> set archivelog destination to 'd:\backup';
4> restore archivelog all;
5> release channel ci;
6> }
8.根据时间查看需要的备份集:
ERPDB1@/orabak>rman target /
RMAN> list backup of archivelog time between
"to_date('2009-06-24 08:00:00','yyyy-mm-dd hh24:mi:ss')" and
"to_date('2009-06-24 13:00','yyyy-mm-dd hh24:mi:ss')";
恢复指定时间段
RMAN> run {
2> set archivelog destination to
'/orabak/testarch';
3> SQL 'ALTER SESSION SET
NLS_DATE_FORMAT="YYYY-MM-DD:HH24:MI:SS"';
4> restore archivelog time between '2009-06-24
09:00:00' and '2009-06-24 12:10:00';
5> }
相关文章推荐
- MySQL 备份与恢复
- SQL Server误区30日谈 第24天 26个有关还原(Restore)的误区
- oracle自动清理archivelog文件的具体方法
- ubuntu 恢复 gnome panel
- Oracle归档日志空间不足引发的问题及解决方法
- 四大Linux备份工具比较与操作实例
- alter system switch logfile和alter system archive log current的区别
- 备份,还原SQL Server数据库
- elasticsearch 1.0 升级2.2的数据备份和恢复
- RMAN BACKUP ... PLUS ARCHIVELOG & ORA-19809
- Oracle db规范之 database所在路径和归档目录所在路径必须分开
- Oracle db规范之 删除oracle 归档日志之前的几个检查项
- restore常用选项
- Restore IP Addresses
- recover和restore的区别
- canvas的save()和restore()运用
- Canvas中保存画布状态及还原
- Oracle归档模式介绍
- Canvas相关知识点介绍
- oracle 闪回点