控制檔案全部丟失的恢復
報錯資訊:
SQL> startup
ORACLE instance started.
Total System Global Area 849530880 bytes
Fixed Size 1339824 bytes
Variable Size 515903056 bytes
Database Buffers 327155712 bytes
Redo Buffers 5132288 bytes
ORA-00205: error in identifying control file, check alert log for more info
檢視警報日誌檔案獲取詳細資訊:
ALTER DATABASE MOUNT
ORA-00210: cannot open the specified control file
ORA-00202: control file: '/u01/app/oracle/flash_recovery_area/orcl/control02.ctl'
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
ORA-00210: cannot open the specified control file
ORA-00202: control file: '/u01/app/oracle/oradata/orcl/control01.ctl'
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
ORA-205 signalled during: ALTER DATABASE MOUNT...
報錯資訊顯示丟失了control01.ctl和control02.ctl。檢視引數control_files值:
SQL> show parameter control_files
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
control_files string /u01/app/oracle/oradata/orcl/c
ontrol01.ctl, /u01/app/oracle/
flash_recovery_area/orcl/contr
ol02.ctl
可看出資料庫中有兩個控制檔案,現在兩個控制檔案都丟失了,嘗試使用rman進行恢復:
[oracle@localhost trace]$ rman target / nocatalog
Recovery Manager: Release 11.2.0.1.0 - Production on Sun Aug 17 22:25:07 2014
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
connected to target database: ORCL (not mounted)
using target database control file instead of recovery catalog
RMAN> restore controlfile from autobackup;
Starting restore at 17-AUG-14
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=22 device type=DISK
recovery area destination: /u01/app/oracle/flash_recovery_area
database name (or database unique name) used for search: ORCL
channel ORA_DISK_1: AUTOBACKUP /u01/app/oracle/flash_recovery_area/ORCL/autobackup/2014_08_17/o1_mf_s_855871765_9z32n64r_.bkp found in the recovery area
AUTOBACKUP search with format "%F" not attempted because DBID was not set
channel ORA_DISK_1: restoring control file from AUTOBACKUP /u01/app/oracle/flash_recovery_area/ORCL/autobackup/2014_08_17/o1_mf_s_855871765_9z32n64r_.bkp
channel ORA_DISK_1: control file restore from AUTOBACKUP complete
output file name=/u01/app/oracle/oradata/orcl/control01.ctl
output file name=/u01/app/oracle/flash_recovery_area/orcl/control02.ctl
Finished restore at 17-AUG-14
嘗試重新開啟資料庫:
SQL> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: '/u01/app/oracle/oradata/orcl/system01.dbf'
造成這種錯誤的原因是控制檔案中的scn和資料檔案中的不一致。
下面透過rman來恢復資料庫:
RMAN> recover database
2> ;
Starting recover at 17-AUG-14
Starting implicit crosscheck backup at 17-AUG-14
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=18 device type=DISK
Crosschecked 17 objects
Finished implicit crosscheck backup at 17-AUG-14
Starting implicit crosscheck copy at 17-AUG-14
using channel ORA_DISK_1
Finished implicit crosscheck copy at 17-AUG-14
searching for all files in the recovery area
cataloging files...
cataloging done
List of Cataloged Files
=======================
File Name: /u01/app/oracle/flash_recovery_area/ORCL/autobackup/2014_08_17/o1_mf_s_855871765_9z32n64r_.bkp
using channel ORA_DISK_1
starting media recovery
archived log for thread 1 with sequence 9 is already on disk as file /u01/app/oracle/oradata/orcl/redo03.log
archived log for thread 1 with sequence 10 is already on disk as file /u01/app/oracle/oradata/orcl/redo01.log
archived log file name=/u01/app/oracle/oradata/orcl/redo03.log thread=1 sequence=9
archived log file name=/u01/app/oracle/oradata/orcl/redo01.log thread=1 sequence=10
media recovery complete, elapsed time: 00:00:01
Finished recover at 17-AUG-14
使用resetlogs開啟資料庫:
SQL> alter database open resetlogs;
Database altered.
SQL> startup
ORACLE instance started.
Total System Global Area 849530880 bytes
Fixed Size 1339824 bytes
Variable Size 515903056 bytes
Database Buffers 327155712 bytes
Redo Buffers 5132288 bytes
ORA-00205: error in identifying control file, check alert log for more info
檢視警報日誌檔案獲取詳細資訊:
ALTER DATABASE MOUNT
ORA-00210: cannot open the specified control file
ORA-00202: control file: '/u01/app/oracle/flash_recovery_area/orcl/control02.ctl'
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
ORA-00210: cannot open the specified control file
ORA-00202: control file: '/u01/app/oracle/oradata/orcl/control01.ctl'
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
ORA-205 signalled during: ALTER DATABASE MOUNT...
SQL> show parameter control_files
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
control_files string /u01/app/oracle/oradata/orcl/c
ontrol01.ctl, /u01/app/oracle/
flash_recovery_area/orcl/contr
ol02.ctl
[oracle@localhost trace]$ rman target / nocatalog
Recovery Manager: Release 11.2.0.1.0 - Production on Sun Aug 17 22:25:07 2014
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
connected to target database: ORCL (not mounted)
using target database control file instead of recovery catalog
Starting restore at 17-AUG-14
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=22 device type=DISK
recovery area destination: /u01/app/oracle/flash_recovery_area
database name (or database unique name) used for search: ORCL
channel ORA_DISK_1: AUTOBACKUP /u01/app/oracle/flash_recovery_area/ORCL/autobackup/2014_08_17/o1_mf_s_855871765_9z32n64r_.bkp found in the recovery area
AUTOBACKUP search with format "%F" not attempted because DBID was not set
channel ORA_DISK_1: restoring control file from AUTOBACKUP /u01/app/oracle/flash_recovery_area/ORCL/autobackup/2014_08_17/o1_mf_s_855871765_9z32n64r_.bkp
channel ORA_DISK_1: control file restore from AUTOBACKUP complete
output file name=/u01/app/oracle/oradata/orcl/control01.ctl
output file name=/u01/app/oracle/flash_recovery_area/orcl/control02.ctl
Finished restore at 17-AUG-14
嘗試重新開啟資料庫:
SQL> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: '/u01/app/oracle/oradata/orcl/system01.dbf'
下面透過rman來恢復資料庫:
RMAN> recover database
2> ;
Starting recover at 17-AUG-14
Starting implicit crosscheck backup at 17-AUG-14
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=18 device type=DISK
Crosschecked 17 objects
Finished implicit crosscheck backup at 17-AUG-14
Starting implicit crosscheck copy at 17-AUG-14
using channel ORA_DISK_1
Finished implicit crosscheck copy at 17-AUG-14
searching for all files in the recovery area
cataloging files...
cataloging done
List of Cataloged Files
=======================
File Name: /u01/app/oracle/flash_recovery_area/ORCL/autobackup/2014_08_17/o1_mf_s_855871765_9z32n64r_.bkp
using channel ORA_DISK_1
starting media recovery
archived log for thread 1 with sequence 9 is already on disk as file /u01/app/oracle/oradata/orcl/redo03.log
archived log for thread 1 with sequence 10 is already on disk as file /u01/app/oracle/oradata/orcl/redo01.log
archived log file name=/u01/app/oracle/oradata/orcl/redo03.log thread=1 sequence=9
archived log file name=/u01/app/oracle/oradata/orcl/redo01.log thread=1 sequence=10
media recovery complete, elapsed time: 00:00:01
Finished recover at 17-AUG-14
使用resetlogs開啟資料庫:
SQL> alter database open resetlogs;
Database altered.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29800581/viewspace-1253150/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 控制檔案全部丟失恢復
- 當前控制檔案全部丟失恢復
- 全部控制檔案丟失後的完全恢復(轉)
- 恢復案例:無歸檔,掉電,控制檔案全部丟失恢復
- 恢復之丟失全部控制檔案以及備份中的控制檔案
- 恢復案例:無歸檔,丟失全部控制檔案、日誌檔案恢復案例
- 控制檔案丟失恢復
- 【控制檔案丟失恢復】
- 恢復丟失的控制檔案
- RMAN恢復案例:丟失全部資料檔案恢復
- 控制檔案部分丟失的恢復
- 控制檔案丟失的RMAN恢復
- 控制檔案丟失恢復(二)
- RMAN恢復案例:無恢復目錄,丟失全部資料檔案、控制檔案、日誌檔案恢復
- 恢復測試:擁有當時的全部歸檔,控制檔案,恢復丟失的資料檔案。
- 丟失全部控制檔案後從RMAN備份集中恢復示例
- 恢復案例:歸檔模式下丟失全部資料檔案的恢復模式
- 開啟 控制檔案自動備份下,引數檔案、控制檔案全部丟失恢復
- 控制檔案全部丟失,無備份,通過異機trace恢復
- 沒有自動備份的情況下控制檔案全部丟失的恢復
- 模擬控制檔案丟失進行恢復。
- 【備份恢復】 丟失一個控制檔案 之恢復操作
- 引數檔案控制檔案和資料檔案丟失的恢復
- rman恢復--丟失控制檔案的恢復
- 只有rman備份集,控制檔案丟失的恢復
- 【恢復】Redo日誌檔案丟失的恢復
- 資料檔案丟失的恢復
- Oracle Password檔案丟失的恢復Oracle
- 非歸檔無備份下控制檔案丟失的恢復
- 【備份恢復】所有控制檔案丟失後 利用trace中的控制檔案備份執行恢復
- 丟失一個控制檔案並恢復資料庫資料庫
- 探索ORACLE之RMAN_07 控制檔案丟失恢復Oracle
- 備份恢復實驗(1)丟失部分控制檔案
- RMAN - "丟失控制檔案的恢復"
- 控制檔案丟失恢復例項(3) - 使用重建控制檔案方式(noresetlogs)
- Oracle 各種檔案丟失的恢復Oracle
- rman恢復:資料檔案丟失,控制檔案丟失,聯機日誌檔案丟失(非當前使用與當前使用)
- 資料檔案丟失如何恢復