解决 oracle 错误ORA-01033
数据库在导入数据的过程中,意外关机。重启机器后,pl/sql-developer不能登录数据库,报错ORA-01033:oracle initializationor shutdown in progress。解决步骤如下:
- 运行cmd
C:\Users\Dell3800>set oracle_sid=orcl
C:\Users\Dell3800>sqlplus "/as sysdba"
SQL*Plus: Release 12.1.0.2.0 Production on Mon Mar 2 08:52:09 2015
Copyright (c) 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 - 关闭数据库,重新启动
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 - 启动后报ORA-01172,根据提示进行恢复。使用命令 alter database recover
SQL> alter database recover
2 ;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.