二 恢复参数文件及控制文件
1 配置新主机上的Oracle_SID
export ORACLE_SID=CRM
2 在新主机上发起rman连接
[oracle@oracle dbs]$ rman target /
Recovery Manager: Release 10.2.0.1.0 - Production on Mon Dec 10 05:49:11 2012
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database (not started)
3 设置dbid 并启动实例到nomount状态
RMAN> set dbid 3601019238
executing command: SET DBID
RMAN> startup nomount
startup failed: ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/oracle/app/db1/dbs/initCRM.ora'
starting Oracle instance without parameter file for retrival of spfile
Oracle instance started
Total System Global Area 159383552 bytes
Fixed Size 2019224 bytes
Variable Size 67108968 bytes
Database Buffers 83886080 bytes
Redo Buffers 6369280 bytes
注意:在rman下即使没有参数文件,默认也会启动一个DUMMY实例,以便能够恢复参数文件。
4 恢复spfile文件
RMAN> restore spfile to '/oracle/app/db1/dbs/spfileCRM.ora' from '/oracle/app/db1/dbs/0dnsd96i_1_1';
Starting restore at 10-DEC-12
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=34 devtype=DISK
channel ORA_DISK_1: autobackup found: /oracle/app/db1/dbs/0dnsd96i_1_1
channel ORA_DISK_1: SPFILE restore from autobackup complete
Finished restore at 10-DEC-12
5 startup force nomount
RMAN> startup force nomount;
Oracle instance started
Total System Global Area 322961408 bytes
Fixed Size 2020480 bytes
Variable Size 96471936 bytes
Database Buffers 218103808 bytes
Redo Buffers 6365184 bytes
6 恢复控制文件
RMAN> restore controlfile to '/oracle/CRM2/CRM/control01.ctl' from '/oracle/app/db1/dbs/0dnsd96i_1_1';
Starting restore at 10-DEC-12
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=210 devtype=DISK
channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:04
Finished restore at 10-DEC-12
cp /oracle/CRM2/CRM/control01.ctl /oracle/CRM2/CRM/control02.ctl
7 启动数据库到加载状态
RMAN> alter database mount;
database mounted
released channel: ORA_DISK_1
