解决 oracle 错误ORA-01033

  数据库在导入数据的过程中,意外关机。重启机器后,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.

转载于:https://www.cnblogs.com/David-Huang/p/4308016.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值