Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3552314
  • 博文数量: 715
  • 博客积分: 1860
  • 博客等级: 上尉
  • 技术积分: 7745
  • 用 户 组: 普通用户
  • 注册时间: 2008-04-07 08:51
个人简介

偶尔有空上来看看

文章分类

全部博文(715)

文章存档

2023年(75)

2022年(134)

2021年(238)

2020年(115)

2019年(11)

2018年(9)

2017年(9)

2016年(17)

2015年(7)

2014年(4)

2013年(1)

2012年(11)

2011年(27)

2010年(35)

2009年(11)

2008年(11)

最近访客

分类: Oracle

2022-05-25 14:31:00

有时dg或某些操作需要,得把备份走的归档恢复出来,借助rman 的restore archivelog 命令很方便。

参考语法:


如果要指定位置则

  1. rman target /
  2. run
  3. {
  4. set archivelog destination to '/tmp/arc/';
  5. restore archivelog sequence 123456;
  6. }

或者

  1. run
  2. {
  3. allocate channel c1 type 'sbt_tape';
  4. set archivelog destination to '/tmp/arc/';
  5. restore archivelog from logseq=47957 until logseq=47962 thread=2; #这应该是老语法,不推荐使用
  6. restore archivelog sequence between 1 and 3 thread=1;
  7. release channel c1;
  8. }


提取完后传输到备库,然后注册一下:
SQL> alter database register logfile '/tmp/oldarc/123456.arc';

如果有很多归档需要注册
RMAN> catalog start with '/u01/oldarc/';
阅读(891) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~