代码改变世界

RMAN异机还原遭遇ORA-19698错误案例

  潇湘隐者  阅读(9520)  评论(0编辑  收藏  举报

实验环境:

              操作系统    :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

clip_image001

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日志文件这样简单方便得多。

SQL> alter database drop logfile group 1;
 
Database altered.
 
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:28:49
 
ORA-19698: /u01/oradata/SCM2/redo02.log is from different database: id=4146921064, db_name=SCM2
 
SQL> alter database drop logfile group 2;
 
ERROR at line 1:
 
ORA-01567: dropping log 2 would leave less than 2 log files for instance SCM2
 
(thread 1)
 
ORA-00312: online log 2 thread 1: '/u01/oradata/SCM2/redo02.log'
 
SQL> alter database add logfile group 1('/u01/oradata/SCM2/redo01.log') size 50M reuse;
 
Database altered.
 
SQL> alter database drop logfile group 2;
 
Database altered.
 
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:32:09
 
ORA-19698: /u01/oradata/SCM2/redo03.log is from different database: id=4146921064, db_name=SCM2
 
SQL> alter database drop logfile group 3;
 
alter database drop logfile group 3
 
*
 
ERROR at line 1:
 
ORA-01623: log 3 is current log for instance SCM2 (thread 1) - cannot drop
 
ORA-00312: online log 3 thread 1: '/u01/oradata/SCM2/redo03.log'
 

[oracle@DB-Server SCM2]$ rm redo03.log

删除redo03.log后,recover database成功

clip_image002

编辑推荐:
· 一个费力不讨好的项目,让我损失了近一半的绩效!
· .NET Core 托管堆内存泄露/CPU异常的常见思路
· PostgreSQL 和 SQL Server 在统计信息维护中的关键差异
· C++代码改造为UTF-8编码问题的总结
· DeepSeek 解答了困扰我五年的技术问题
阅读排行:
· 一个费力不讨好的项目,让我损失了近一半的绩效!
· 清华大学推出第四讲使用 DeepSeek + DeepResearch 让科研像聊天一样简单!
· 实操Deepseek接入个人知识库
· CSnakes vs Python.NET:高效嵌入与灵活互通的跨语言方案对比
· Plotly.NET 一个为 .NET 打造的强大开源交互式图表库
历史上的今天:
2012-05-16 ORA-12154: TNS:could not resolve the connect identifier specified
2012-05-16 Win2003 设置远程连接限制数
点击右上角即可分享
微信分享提示