[ORA-01033: ORACLE is initializing or shutting down] problem solution

When Oracle suddenly loses power during operation, when logging in again through PL/SQL, an error is reported

[ORA-01033: ORACLE正在初始化或关闭]

The reason for this may be that the database suddenly stops, and the LOG in the cache area has not been archived in time, so the log file cannot be matched when it is opened next time.

solution:

1. Open the command line interface and enter sqlplus system/sys as sysdba (login as administrator)

Microsoft Windows [版本 6.1.7601]
版权所有 (c) 2009 Microsoft Corporation。保留所有权利。

C:\Users\Berlin>sqlplus system/sys as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on 星期五 6月 15 17:15:28 2018

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


连接到:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

2. Enter the command startup mount to load the database, but the prompt statement "ORA-01081: cannot start the running ORACLE - please close it first" is reported. So use the command shutdown immediate to unload the database, and then load it. This process takes a little time, so be patient.

SQL> startup mount
ORA-01081: 无法启动已在运行的 ORACLE - 请先将其关闭
SQL> shutdown immediate
ORA-01109: 数据库未打开

已经卸载数据库。
ORACLE 例程已经关闭。
SQL> startup mount
ORACLE 例程已经启动。

Total System Global Area 3841982464 bytes
Fixed Size                  8753768 bytes
Variable Size             889195928 bytes
Database Buffers         2936012800 bytes
Redo Buffers                8019968 bytes
数据库装载完毕。

3. Enter the alter database open; command. If there is an error message "ORA-01589: RESETLOGS or NORESETLOGS option must be used to open the database", then use the command alter database open resetlogs; [be
sure to enter a semicolon, otherwise the relevant content cannot be output correctly.

SQL> alter database open;
alter database open
*
第 1 行出现错误:
ORA-01589: 要打开数据库则必须使用 RESETLOGS 或 NORESETLOGS 选项


SQL> alter database open resetlogs;
alter database open resetlogs
*
第 1 行出现错误:
ORA-01245: RESETLOGS 完成时脱机文件 1 将丢失
ORA-01110: 数据文件 1: 'C:\APP\BERLIN\ORACLEDB\ORADATA\ORCL\SYSTEM01.DBF'

4. Enter the command recover database using backup controlfile; [need to enter a semicolon]

SQL> recover database using backup controlfile;
ORA-00279: 更改 18478439 (在 05/29/2018 23:44:10 生成) 对于线程 1 是必需的
ORA-00289: 建议:
C:\APP\BERLIN\ORACLEDB\RECOVERY_AREA\ORCL\ARCHIVELOG\2018_06_15\O1_MF_1_412_%U_.
ARC
ORA-00280: 更改 18478439 (用于线程 1) 在序列 #412 中

指定日志: {<RET>=suggested | filename | AUTO | CANCEL}

5. Enter the full path where the log is located,
insert image description here
try it from REDO01.LOG to REDO03.LOG in sequence

指定日志: {<RET>=suggested | filename | AUTO | CANCEL}
C:\app\oradata\ORCL\REDO01.LOG
已应用的日志。
完成介质恢复。

Finally complete all recovery process.

Reprint: Remember an exception to repair the Oracle database: [ORA-01033: ORACLE is initializing or closing]
Reference: ORA-01589: To open the database, you must use the RESETLOGS or NORESETLOGS option

Guess you like

Origin blog.csdn.net/beihuanlihe130/article/details/108149030