其他分享
首页 > 其他分享> > ORA-16433 The database must be opened in read write mode故障解决

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

作者:互联网

一、首先删除原有控制文件并新建控制文件

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 ?

指定日志: {<RET>=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>


标签:opened,database,write,SQL,4658923,alter,CHANGE,ORA
来源: https://blog.51cto.com/lhrbest/2696721