Oracle

數據庫無法啟動顯示控製文件與另一個不一致

  • December 19, 2015

我們的 windows server 2008 R2 由於電源故障而關閉。當我嘗試啟動 Oracle 11g 數據庫時,它顯示錯誤。

SQL> startup
ORA-01081: cannot start already-running ORACLE - shut it down first
SQL> startup mount
ORA-01081: cannot start already-running ORACLE - shut it down first
SQL> shut immediate
ORA-01507: database not mounted


ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.

Total System Global Area 3206836224 bytes
Fixed Size                  2180024 bytes
Variable Size            2415922248 bytes
Database Buffers          771751936 bytes
Redo Buffers               16982016 bytes
ORA-00214: control file 'D:\APP\ADMINISTRATOR\ORADATA\ORCL\CONTROL01.CTL'
version 145627 inconsistent with file
'D:\APP\ADMINISTRATOR\FLASH_RECOVERY_AREA\ORCL\CONTROL02.CTL' version 145625

誰能幫我解決這個問題?

我嘗試了以下步驟並從 RMAN 備份中恢復了控製文件。它工作成功……

SQL>shutdown abort;

ORACLE instance shut down.

SQL> startup nomount

ORACLE instance started.
Total System Global Area 3206836224 bytes
Fixed Size                  2180024 bytes
Variable Size            2415922248 bytes
Database Buffers          771751936 bytes
Redo Buffers               16982016 bytes
SQL>

====從 spfile 創建 pfile=‘c:/initnew.ora’;

SQL> create pfile='c:\p.txt' from spfile;

File created.

shutdown abort;

ORACLE instance shut down.

—–編輯pfile並從controlfiles參數中刪除controlfile 02

—–然後從新創建的 pfile 引導系統

SQL> startup mount pfile='c:\p.txt';

SQL>rman target /

RMAN>restore controlfile from autobackup;

RMAN> quit

SQL>shut immediate

SQL>startup mount;

ORACLE instance started.
Total System Global Area 3206836224 bytes
Fixed Size                  2180024 bytes
Variable Size            2415922248 bytes
Database Buffers          771751936 bytes
Redo Buffers               16982016 bytes
ORA-00214: control file
'D:\APP\ADMINISTRATOR\FLASH_RECOVERY_AREA\ORCL\CONTROL02.CTL' version 145625
inconsistent with file 'D:\APP\ADMINISTRATOR\ORADATA\ORCL\CONTROL01.CTL' version 144010

SQL> shut immediate
ORA-01507: database not mounted


ORACLE instance shut down.

SQL>startup force mount pfile='c:\p.txt';

ORACLE instance started.
Total System Global Area 3206836224 bytes
Fixed Size                  2180024 bytes
Variable Size            2415922248 bytes
Database Buffers          771751936 bytes
Redo Buffers               16982016 bytes
Database mounted.
SQL>host rman target /

RMAN>recover database;

RMAN> alter database open resetlogs;

database opened.

您應該能夠通過複製來解決此問題,CONTROL01.CTL因為CONTROL02.CTL第一個版本號更高。複製一份CONTROL02.CTL以防萬一

引用自:https://dba.stackexchange.com/questions/123917