--注:备份操作省略,详见利用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