Oracle ORA-01033: ORACLE initialization or shutdown in progressProcess解决方案

业务背景
因公司异常停电,造成oracle数据库文件损坏且Oracle数据库没有做备份,导致登录Oracle报ORA-01033: ORACLE initialization or shutdown in progressProcess ID: 0Session ID: 0 Serial number: 0
Oracle ORA-01033: ORACLE initialization or shutdown in progressProcess解决方案_第1张图片
解决方案
1.运行cmd:
C:\administrator>set oracle_sid=orcl(此为数据库的实例名称)
C:\administrator>sqlplus "/as sysdba"
SQL*Plus: Release 12.1.0.2.0 Production on Mon Mar 2 08:52:09 2015
Copyright © 1982, 2014, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

2.关闭数据库,重新启动:
SQL> shutdown immediate
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 778387456 bytes
Fixed Size 1374808 bytes
Variable Size 318768552 bytes
Database Buffers 452984832 bytes
Redo Buffers 5259264 bytes
Database mounted.
ORA-01172: recovery of thread 1 stuck at block 2937401 of file 7
ORA-01151: use media recovery to recover block, restore backup if needed

Oracle ORA-01033: ORACLE initialization or shutdown in progressProcess解决方案_第2张图片
3.关闭数据库,重新启动
SQL> shutdown immediate
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 778387456 bytes
Fixed Size 1374808 bytes
Variable Size 318768552 bytes
Database Buffers 452984832 bytes
Redo Buffers 5259264 bytes
Database mounted.
ORA-01172: recovery of thread 1 stuck at block 2937401 of file 7
ORA-01151: use media recovery to recover block, restore backup if needed
Oracle ORA-01033: ORACLE initialization or shutdown in progressProcess解决方案_第3张图片
如果是报:
Oracle ORA-01033: ORACLE initialization or shutdown in progressProcess解决方案_第4张图片
则需进行:
SQL> RECOVER DATAFILE 'c:\app\administrator\oradata\orcl\system01.dbf'
Media recovery complete.
SQL> recover tablespace system;
Media recovery complete.
SQL> RECOVER DATABASE;
Media recovery complete.
SQL> ALTER DATABASE OPEN;
Database altered.

重新启动数据库,没有报错。pl/sql-developer登陆成功
SQL> shutdown immediate
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 778387456 bytes
Fixed Size 1374808 bytes
Variable Size 318768552 bytes
Database Buffers 452984832 bytes
Redo Buffers 5259264 bytes
Database mounted.
Database opened.

Oracle ORA-01033: ORACLE initialization or shutdown in progressProcess解决方案_第5张图片
有可能遇见登录不上的情况,这时候需要重置密码
1.cmd进入命令行 -->右键选“以管理员身份运行” --> 输入sqlplus /nolog
2.输入conn /as sysdba
Oracle ORA-01033: ORACLE initialization or shutdown in progressProcess解决方案_第6张图片
3.输入select username from dba_users;查询所有的用户名称
在这里插入图片描述
4.输入alter user sys identified by chen1016;sys是用户的名称,chen1016是要更换的密码。此时密码已经更改
Oracle ORA-01033: ORACLE initialization or shutdown in progressProcess解决方案_第7张图片

参数资料:
1.解决Oracle错误 ORA-01033
地址:https://www.cnblogs.com/David-Huang/p/4308016.html
2.解决Windows Oracle ORA-01113和ORA-01110错误
地址:https://www.cnblogs.com/xingyys/p/11340140.html
3.Windows环境下对Oracle用户名进行修改密码操作
地址:https://blog.csdn.net/c153996102/article/details/81531821

注意事项
1.对于Cmd执行Sql后出现2的情况;
解决方案:sql后面没有加分号,切换输入法加分号;
2.修改密码之后还是不能登录,但是检查密码发现一致;
解决方案:Oracle 11G对大小写敏感,输入密码的时候注意大小写
3.注意数据库备份,如果不备份,某天真的出现其他故障,哭都没有地方哭

你可能感兴趣的:(toad,Oracle,C#基础知识)