码迷,mamicode.com
首页 > 数据库 > 详细

解决 oracle 错误ORA-01033

时间:2015-03-02 11:01:40      阅读:248      评论:0      收藏:0      [点我收藏+]

标签:

  数据库在导入数据的过程中,意外关机。重启机器后,pl/sql-developer不能登录数据库,报错ORA-01033:oracle initializationor shutdown in progress。解决步骤如下:

  1. 运行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

  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

  3. 启动后报ORA-01172,根据提示进行恢复。使用命令 alter database recover

    SQL> alter database recover
    2 ;

    Database altered.

  4. 重新启动数据库,没有报错。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

标签:

原文地址:http://www.cnblogs.com/David-Huang/p/4308016.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!