当前位置:网站首页>Oracle ora-01033: Oracle initialization or shutdown in progressprocess solution

Oracle ora-01033: Oracle initialization or shutdown in progressprocess solution

2022-04-23 21:26:00 Plant a sweet smell

Business background
Due to abnormal power failure of the company , cause oracle The database file is corrupt and Oracle The database is not backed up , Cause login Oracle newspaper ORA-01033: ORACLE initialization or shutdown in progressProcess ID: 0Session ID: 0 Serial number: 0
 Insert picture description here
Solution
1. function cmd:
C:\administrator>set oracle_sid=orcl( This is the instance name of the database )
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. Close the database , Restart :
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

 Insert picture description here
3. Close the database , Restart
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
 Insert picture description here
If it's a newspaper :
 Insert picture description here
It needs to be done :
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.

Restart the database , No report error .pl/sql-developer Landing successful
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.

 Insert picture description here
It is possible to encounter the situation that you can't log in , At this time, you need to reset the password
1.cmd Go to the command line --> Right click to select “ Run as administrator ” --> Input sqlplus /nolog
2. Input conn /as sysdba
 Insert picture description here
3. Input select username from dba_users; Query all user names
 Insert picture description here
4. Input alter user sys identified by chen1016;sys Is the name of the user ,chen1016 Is the password to be changed . The password has been changed
 Insert picture description here

Parameter data :
1. solve Oracle error ORA-01033
Address :https://www.cnblogs.com/David-Huang/p/4308016.html
2. solve Windows Oracle ORA-01113 and ORA-01110 error
Address :https://www.cnblogs.com/xingyys/p/11340140.html
3.Windows Environment Oracle User name to change password
Address :https://blog.csdn.net/c153996102/article/details/81531821

matters needing attention
1. about Cmd perform Sql Later 2 The situation of ;
Solution :sql There is no semicolon after it , Switch input method plus semicolon ;
2. After changing the password, you still can't log in , But check the password and find that it is consistent ;
Solution :Oracle 11G Case sensitive , Pay attention to case when entering password
3. Pay attention to database backup , If you do not back up , Some day there are other faults , There's no place to cry

版权声明
本文为[Plant a sweet smell]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/110/202204200619556868.html