实验环境:
操作系统 :Oracle Linux Server release 5.7 64 bit
数据库版本:Oracle Database 10g Release 10.2.0.4.0 - 64bit Production
案例说明:
为了测试、验证备份的有效性,需要将服务器A上的数据库的备份集还原到服务器B上,服务器B上已经创建了相同名称的ORACLE_SID和DB Name,对应数据文件目录环境完全一致
Step 1: startup nomount
Step 2: restore spfile
Step 3: restore controlfile
Step 4: startup mount;
Step 5: restore database
Step 6: recover database
由于在没有在RMAN还原时忘记设置 DBID,结果在执行recover database时报ORA-19698: /u01/oradata/SCM2/redo01.log is from different database: id=4146921064, db_name=SCM2
RMAN> recover database;
Starting recover at 14-MAY-14
using channel ORA_DISK_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 05/14/2014 10:15:30
ORA-19698: /u01/oradata/SCM2/redo01.log is from different database: id=4146921064, db_name=SCM2
此时需要删除redo日志文件,结果在sqlplus里面删除redo日志文件,遇到下面一系列问题。其实可以直接使用rm命令直接删除redo日志文件这样简单方便得多。