ORA-16433 The database must be opened in read write mode故障解決

stonebox1122發表於2015-02-06

一、首先刪除原有控制檔案並新建控制檔案

1、找到控制檔案位置

SQL> show parameter control_files;

NAME TYPE VALUE

------------------------------------ ----------- ------------------------------

control_files string C:\APP\ADMINISTRATOR\ORADATA\C

                                                 METEST\CONTROLFILE\O1_MF_9OZDT

                                                 FYF_.CTL, C:\APP\ADMINISTRATOR

                                                 \FLASH_RECOVERY_AREA\CMETEST\C

                                                 ONTROLFILE\O1_MF_9OZDTG4K_.CTL

2、重建控制檔案(透過控制檔案備份重建,或者透過現有控制檔案重建)

備份控制檔案到文字檔案(檢視控制檔案具體內容)

SQL> alter database backup controlfile to trace as '/home/oracle/ctl.txt';

Database altered.

linux下可以使用:

SQL> host strings  /home/oracle/control03.ctl  >  /home/oracle/ctl.txt

SQL> host cat /home/oracle/ctl.txt

從生成的檔案中找到控制檔案的內容,複製成sql指令碼

3、刪除控制檔案

4、由spfile建立pfile,並新增下面的三個參賽引數

_allow_error_simulation=TRUE

_allow_resetlogs_corruption=TRUE

_allow_terminal_recovery_corruption=TRUE

 

二、具體恢復流程如下:

C:\Users\Administrator>sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on 星期二 9月 30 15:40:24 2014

Copyright (c) 1982, 2010, Oracle. All rights reserved.

已連線到空閒例程。

SQL> startup pfile='C:\app\Administrator\product\11.2.0\dbhome_1\database\pfilec

me.ora' mount;

ORACLE 例程已經啟動。

Total System Global Area 1060585472 bytes

Fixed Size 2182504 bytes

Variable Size 771752600 bytes

Database Buffers 281018368 bytes

Redo Buffers 5632000 bytes

ORA-00205: ?????????, ??????, ???????

SQL> select status from v$instance;

STATUS

------------------------

STARTED

SQL> @e:/ctl.sql;

控制檔案已建立。

SQL> recover database until cancel using backup controlfile;

ORA-00279: ?? 4658923 (? 09/30/2014 15:31:26 ??) ???? 1 ????

ORA-00289: ??:

E:\FLASH_RECOVERY_AREA\CMETEST\ARCHIVELOG\2014_09_30\O1_MF_1_1_%U_.ARC

ORA-00280: ?? 4658923 (???? 1) ??? #1 ?

指定日誌: {=suggested | filename | AUTO | CANCEL}

auto

ORA-00308: ????????

'E:\FLASH_RECOVERY_AREA\CMETEST\ARCHIVELOG\2014_09_30\O1_MF_1_1_%U_.ARC'

ORA-27041: ??????

OSD-04002: ????????????

O/S-Error: (OS 2) ??????????????????????

ORA-00308: ????????

'E:\FLASH_RECOVERY_AREA\CMETEST\ARCHIVELOG\2014_09_30\O1_MF_1_1_%U_.ARC'

ORA-27041: ??????

OSD-04002: ????????????

O/S-Error: (OS 2) ??????????????????????

ORA-01547: ??: RECOVER ??? OPEN RESETLOGS ???????

ORA-01194: ?? 1 ?????????????

ORA-01110: ???? 1:

'C:\APP\ADMINISTRATOR\ORADATA\CMETEST\DATAFILE\O1_MF_SYSTEM_9OZDTXRQ_.DBF'

SQL> select file#,CHECKPOINT_CHANGE#,LAST_CHANGE# from v$datafile order by 1;

     FILE# CHECKPOINT_CHANGE# LAST_CHANGE#

---------- ------------------ ------------

         1 4658923

         2 4658923

         3 4658923

         4 4658923

         5 4658923

         6 4658923

已選擇6行。

SQL> select file#,CHECKPOINT_CHANGE# from v$datafile_header order by 1;

     FILE# CHECKPOINT_CHANGE#

---------- ------------------

         1 4658923

         2 4658923

         3 4658923

         4 4658923

         5 4658923

         6 4658923

已選擇6行。

SQL> select CHECKPOINT_CHANGE# from v$database;

CHECKPOINT_CHANGE#

------------------

           4658920

SQL> shutdown immediate;

ORA-01109: ??????

已經解除安裝資料庫。

ORACLE 例程已經關閉。

SQL> startup nomount pfile='C:\app\Administrator\product\11.2.0\dbhome_1\databas

e\pfilecme.ora';

ORACLE 例程已經啟動。

Total System Global Area 1060585472 bytes

Fixed Size 2182504 bytes

Variable Size 771752600 bytes

Database Buffers 281018368 bytes

Redo Buffers 5632000 bytes

SQL> alter database mount;

資料庫已更改。

SQL> alter session set events '10015 trace name ADJUST_SCN level 10';

會話已更改。

SQL> alter database open;

alter database open

*

第 1 行出現錯誤:

ORA-01589: ??????????? RESETLOGS ? NORESETLOGS ??

SQL> alter database open resetlogs;

資料庫已更改。

SQL> select open_mode from v$database;

OPEN_MODE

--------------------

READ WRITE

SQL> alter system switch logfile;

系統已更改。

SQL>

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/28536251/viewspace-1429150/,如需轉載,請註明出處,否則將追究法律責任。

相關文章