断电oracle 01033,电脑非法关机 导致ORA-01033:解决方法

今天研究Oracle遇到了这个问题ora-01033:oracle initializationor shutdown in progress

ORA-01033:ORACLEinitialization or shutdown in progress

解决方法

1)开始-运行-cmd

2)命令行中输入SQLPLUS SYS/SYS AS SYSDBA

3)输入SHUTDOWN

4)输入STARTUP.注意这里是最重要的地方,在显示相关数据后,它还会显示为什么不能启动的错误所在.

C:\Users\lenovo>SQLPLUSSYS/SYS AS SYSDBA

SQL*Plus: Release 10.2.0.3.0 - Production on星期三 7月 3 11:43:32 2013

Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.

连接到:

Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 -Production

With the Partitioning, OLAPand Data Mining options

SQL> SHUTDOWN

ORA-01109:数据库未打开

已经卸载数据库。

ORACLE例程已经关闭。

SQL> STARTUP

ORACLE例程已经启动。

Total System Global Area 293601280 bytes

Fixed Size                 1290208 bytes

Variable Size            234881056 bytes

Database Buffers           50331648 bytes

Redo Buffers               7098368 bytes

数据库装载完毕。

ORA-01157:无法标识/锁定数据文件 6 - 请参阅 DBWR 跟踪文件

ORA-01110:数据文件 6: 'F:\DC\DB\SDRS\TS_SDRS.DBF'

SQL> alter databasedatafile'F:\DC\DB\SDRS\TS_SDRS.DBF'offline drop;

数据库已更改。

SQL> alter database open;

数据库已更改。

SQL> drop tablespaceTS_SDRS including contents;

表空间已删除。

SQL> create undo tablespace TS_SDRS

2  datafile'CracleoradatasmsdbUNDOTBS01.DBF'size 2048M extent management local;

表空间已创建。

SQL> alter system setundo_tablespace=TS_SDRS;

系统已更改。

SQL> shutdown

数据库已经关闭。

已经卸载数据库。

ORACLE例程已经关闭。

SQL> startup

ORACLE例程已经启动。

Total System Global Area  293601280 bytes

Fixed Size                 1290208 bytes

Variable Size            243269664 bytes

Database Buffers          41943040 bytes

Redo Buffers               7098368 bytes

数据库装载完毕。

数据库已经打开。

SQL>

------------------

ORA-01245、ORA-01547错误的解决

数据库rman restore database 之后,执行recover database的时候,报告ORA-01245错误,详细的错误信息如下:

SQL> recover database until cancel;

ORA-00279: change 575876 generated at 12/01/2009 08:19:49 needed for thread 1

ORA-00289: suggestion :

/oracle/flash_recovery_area/ORCL/archivelog/2009_12_01/o1_mf_1_2_%u_.arc

ORA-00280: change 575876 for thread 1 is in sequence #2

Specify log: {=suggested | filename | AUTO | CANCEL}

auto

ORA-00308: cannot open archived log

'/oracle/flash_recovery_area/ORCL/archivelog/2009_12_01/o1_mf_1_2_%u_.arc'

ORA-27037: unable to obtain file status

Linux Error: 2: No such file or directory

Additional information: 3

ORA-00308: cannot open archived log

'/oracle/flash_recovery_area/ORCL/archivelog/2009_12_01/o1_mf_1_2_%u_.arc'

ORA-27037: unable to obtain file status

Linux Error: 2: No such file or directory

Additional information: 3

ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below

ORA-01245: offline file 2 will be lost if RESETLOGS is done

ORA-01110: data file 2: '/oracle/oradata/orcl/undotbs01.dbf'

SQL>

[@more@]

检查ORA-01245那一行,发现是datafile 2状态为offline,解决的方法就是首先将datafile 2 online,然后再recover database。SQL> alter database datafile 2 online;

Database altered.

SQL> recover database until cancel;

ORA-00279: change 575876 generated at 12/01/2009 08:19:49 needed for thread 1

ORA-00289: suggestion :

/oracle/flash_recovery_area/ORCL/archivelog/2009_12_01/o1_mf_1_2_%u_.arc

ORA-00280: change 575876 for thread 1 is in sequence #2

Specify log: {=suggested | filename | AUTO | CANCEL}

cancel

Media recovery cancelled.

SQL> alter database open resetlogs;

Database altered.

SQL>

--------------------

ORA-01589: 要打开数据库则必须使用 RESETLOGS 或 NOR

ORA-01589: 要打开数据库则必须使用 RESETLOGS 或 NORESETLOGS

选项

SQL> alter database open ORA-01589: 要打开数据库则必须使用 RESETLOGS 或

NORESETLOGS 选项

SQL> alter database open resetlogs;

alter database

open resetlogs

*

ERROR 位于第 1 行:

ORA-01113: 文件 1 需要介质恢复

ORA-01110:

数据文件 1: 'E:\ORACLE\ORADATA\EYGLE\SYSTEM01.DBF'

SQL> recover database

using backup controlfile;

ORA-00279: 更改 1670743 (在 04/17/2008 14:13:16 生成)

对于线程 1 是必需的

ORA-00289: 建议: E:\ORACLE\ORA92\RDBMS\ARC00030.001

ORA-00280:

更改 1670743 对于线程 1 是按序列 # 30 进行的

指定日志: {=suggested | filename |

AUTO | CANCEL}

E:\oracle\oradata\EYGLE\REDO01.LOG

ORA-00310: 存档日志包含序列

29;要求序列 30

ORA-00334: 归档日志:

'E:\ORACLE\ORADATA\EYGLE\REDO01.LOG'

SQL> recover database using

backup controlfile;

ORA-00279: 更改 1670743 (在 04/17/2008 14:13:16 生成) 对于线程 1

是必需的

ORA-00289: 建议: E:\ORACLE\ORA92\RDBMS\ARC00030.001

ORA-00280: 更改

1670743 对于线程 1 是按序列 # 30 进行的

指定日志: {=suggested | filename |

AUTO |

CANCEL}

E:\oracle\oradata\EYGLE\REDO02.LOG

已应用的日志。

完成介质恢复。

SQL>

alter database open resetlogs;

数据库已更改。

OK,搞定了!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值