RAC+ASM在单机上恢复的过程
2008-12-18 13:07:14 来源:WEB开发网2 进入RMAN,强行启动数据库(会报没有参数文件)后,恢复参数文件。
rman target /
startup nomount
restore spfile from '/oradata/orabak/rmanspctlback/c-3276392049-20080620-01';
3 根据spfile, 恢复出pfile, 编辑pfile, 去掉与rac设置相关的参数, 再将pfile转换成spfile
create pfile from spfile;
shutdown abort;
vi initccdb1.ora -- 去掉与rac设置相关的参数,同时注意参数里指定的各目录是否存在。
create spfile from pfile;
4 使用新创建的spfile 启动数据库,恢复出控制文件。
startup nomount;
restore controlfile from '/oradata/orabak/rmanspctlback/c-3276392049-20080620-01';
alter database mount;
5 由于正式环境使用了ASM,数据文件,在线日志都存在ASM里,而测试环境没有ASM,故需要将文件转换,存放到文件系统下,
进入SQLPLUS, 找出该库的归档日志,重新指定在线日志的路径。
sqlplus / as sysdba
select * from v$logfile;
alter database rename file '+ASMDISK/ccdb/onlinelog/group_3.267.648572919' to '/oradata/ccdb/redo0302.log';
alter database rename file '+ASMDISK/ccdb/onlinelog/group_2.264.648572917' to '/oradata/ccdb/redo0201.log';
alter database rename file '+ASMDISK/ccdb/onlinelog/group_2.265.648572919' to '/oradata/ccdb/redo0202.log';
alter database rename file '+ASMDISK/ccdb/onlinelog/group_1.262.648572915' to '/oradata/ccdb/redo0101.log';
alter database rename file '+ASMDISK/ccdb/onlinelog/group_1.263.648572917' to '/oradata/ccdb/redo0102.log';
alter database rename file '+ASMDISK/ccdb/onlinelog/group_4.270.648573025' to '/oradata/ccdb/redo0401.log';
alter database rename file '+ASMDISK/ccdb/onlinelog/group_4.271.648573025' to '/oradata/ccdb/redo0402.log';
alter database rename file '+ASMDISK/ccdb/onlinelog/group_5.272.648573025' to '/oradata/ccdb/redo0501.log';
alter database rename file '+ASMDISK/ccdb/onlinelog/group_5.273.648573027' to '/oradata/ccdb/redo0502.log';
alter database rename file '+ASMDISK/ccdb/onlinelog/group_6.274.648573027' to '/oradata/ccdb/redo0601.log';
alter database rename file '+ASMDISK/ccdb/onlinelog/group_6.275.648573027' to '/oradata/ccdb/redo0602.log';
更多精彩
赞助商链接