oracle断电重启之ORA-01033和ORA-01172

来源:互联网 发布:天天特价淘宝店 编辑:程序博客网 时间:2024/05/03 17:29
--尝试连接数据库prjdbC:\Documents and Settings\Administrator>sqlplus test/test@prjdbSQL*Plus: Release 11.2.0.1.0 Production on Mon Jun 9 17:23:08 2014Copyright (c) 1982, 2010, Oracle.  All rights reserved.--报错ORA01033ERROR:ORA-01033: ORACLE ????????Process ID: 0Session ID: 0 Serial number: 0--查找ORA-01033的根源是什么,使用管理员身份登陆C:\Documents and Settings\Administrator>SQLPLUS SYS/SYS AS SYSDBASQL*Plus: Release 11.2.0.1.0 Production on Mon Jun 9 17:25:31 2014Copyright (c) 1982, 2010, Oracle.  All rights reserved.Connected to:Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing options--关闭数据库实例SQL> SHUTDOWNORA-01109: database not openDatabase dismounted.ORACLE instance shut down.--尝试启动数据库,如果启动失败会报错,这样就能够找到问题根源。SQL> STARTUPORACLE instance started.Total System Global Area  778387456 bytesFixed Size                  1374808 bytesVariable Size             469763496 bytesDatabase Buffers          301989888 bytesRedo Buffers                5259264 bytesDatabase mounted.--问题根源是ORA-01172和ORA-01151ORA-01172: recovery of thread 1 stuck at block 651 of file 90ORA-01151: use media recovery to recover block, restore backup if needed--查看file 90到底是哪一个文件,此步骤非必需SQL> select file#,name from v$datafile where file#=90;     FILE#     NAME     90        D:\ORACLE\ORADATA\PRJDB\TS_HIS18.DBF     --恢复file 90SQL> recover datafile 90;Media recovery complete.SQL> exitDisconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing options--再次尝试连接prjdbC:\Documents and Settings\Administrator>sqlplus test/test@prjdbSQL*Plus: Release 11.2.0.1.0 Production on Mon Jun 9 17:46:33 2014Copyright (c) 1982, 2010, Oracle.  All rights reserved.--依然失败ERROR:ORA-01033: ORACLE ????????Process ID: 0Session ID: 0 Serial number: 0--重复前面的操作C:\Documents and Settings\Administrator>SQLPLUS SYS/SYS AS SYSDBASQL*Plus: Release 11.2.0.1.0 Production on Mon Jun 9 17:46:46 2014Copyright (c) 1982, 2010, Oracle.  All rights reserved.Connected to:Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing optionsSQL> select open_mode from v$database;OPEN_MODE--------------------MOUNTEDSQL> alter database open;alter database open*ERROR at line 1:--发现还有一个file 7也是有问题的ORA-01172: recovery of thread 1 stuck at block 89361 of file 7ORA-01151: use media recovery to recover block, restore backup if needed--恢复file 7SQL> recover datafile 7;Media recovery complete.--再次启动数据库SQL> alter database open;--数据库启动成功Database altered.SQL> exitDisconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing options--再次尝试连接C:\Documents and Settings\Administrator>sqlplus test/test@prjdbSQL*Plus: Release 11.2.0.1.0 Production on Mon Jun 9 17:48:33 2014Copyright (c) 1982, 2010, Oracle.  All rights reserved.Connected to:Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing optionsSQL> --连接成功。
0 0