利用rman进行异机还原(目录不同)

--注:备份操作省略,详见利用rman进行异机还原(目录相同)。下列操作均在目标服务器上进行。

--rman
[oracle@db02 ~]$ rman target /

Recovery Manager: Release 10.2.0.1.0 - Production on Sun Sep 22 08:19:14 2013

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

connected to target database: orcl (not mounted)

--设置dbid
RMAN> set dbid=1354163930

executing command: SET DBID

--还原控制文件
--在还原控制文件前,为了将控制文件与数据文件、日志文件放在同一文件目录,我对initsid.ora文件做了相应修改,此处省略...
RMAN> restore controlfile from '/u02/backup/ctl_20130922_0gokfho9_1_1.bak';

Starting restore at 22-SEP-13
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=155 devtype=DISK

channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
output filename=/u03/oradata/orcl/control01.ctl
output filename=/u03/oradata/orcl/control02.ctl
output filename=/u03/oradata/orcl/control03.ctl
Finished restore at 22-SEP-13

--打开数据库到mount状态
RMAN> alter database mount;

database mounted
released channel: ORA_DISK_1

--执行下列run脚本(根据数据文件的不同作相应修改)
RMAN> run{
set newname for datafile '/u02/oradata/orcl/system01.dbf' to '/u03/oradata/orcl/system01.dbf';
set new

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值