程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 數據庫知識 >> Oracle數據庫 >> Oracle教程 >> RMAN異機還原遭遇ORA-19698錯誤案例

RMAN異機還原遭遇ORA-19698錯誤案例

編輯:Oracle教程

實驗環境:

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

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

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved