参考文章:
ORA-01033解决和Oracle数据库掉电后 ORA-01172 磁盘坏块解决方法
我的解决记录:
Microsoft Windows [版本 6.1.7601]
版权所有 (c) 2009 Microsoft Corporation。保留所有权利。
C:\Users\topwqp>sqlplus/nolog
SQL*Plus: Release 11.1.0.6.0 - Production on 星期二 7月 3 10:21:59 2012
Copyright (c) 1982, 2007, Oracle. All rights reserved.
SQL> connect sys/orcl as sysdbz
SP2-0306: 选项无效。
用法: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER|SYSASM}]
其中 <logon> ::= <username>[/<password>][@<connect_identifier>] [edition=value]
| /
SQL> connect sys/orcl as sysdba
已连接。
SQL>
SQL> shutdown normal
ORA-01109: 数据库未打开
已经卸载数据库。
ORACLE 例程已经关闭。
SQL> startup mount
ORACLE 例程已经启动。
Total System Global Area 535662592 bytes
Fixed Size 1334380 bytes
Variable Size 138412948 bytes
Database Buffers 390070272 bytes
Redo Buffers 5844992 bytes
数据库装载完毕。
SQL> alter database open;
alter database open
*
第 1 行出现错误:
ORA-01172: 线程 1 的恢复停止在块 3365 (在文件 3 中)
ORA-01151: 如果需要, 请使用介质恢复以恢复块和还原备份
SQL> select open_mode from v$database;
OPEN_MODE
----------
MOUNTED
SQL> select file#,name from v$datafile where file#=3;
FILE#
----------
NAME
--------------------------------------------------------------------------------
3
D:\ORACLE\ORADATA\ORCL\UNDOTBS01.DBF
SQL> recover datafile 3;
完成介质恢复。
SQL> alter database open;
数据库已更改。
版权所有 (c) 2009 Microsoft Corporation。保留所有权利。
C:\Users\topwqp>sqlplus/nolog
SQL*Plus: Release 11.1.0.6.0 - Production on 星期二 7月 3 10:21:59 2012
Copyright (c) 1982, 2007, Oracle. All rights reserved.
SQL> connect sys/orcl as sysdbz
SP2-0306: 选项无效。
用法: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER|SYSASM}]
其中 <logon> ::= <username>[/<password>][@<connect_identifier>] [edition=value]
| /
SQL> connect sys/orcl as sysdba
已连接。
SQL>
SQL> shutdown normal
ORA-01109: 数据库未打开
已经卸载数据库。
ORACLE 例程已经关闭。
SQL> startup mount
ORACLE 例程已经启动。
Total System Global Area 535662592 bytes
Fixed Size 1334380 bytes
Variable Size 138412948 bytes
Database Buffers 390070272 bytes
Redo Buffers 5844992 bytes
数据库装载完毕。
SQL> alter database open;
alter database open
*
第 1 行出现错误:
ORA-01172: 线程 1 的恢复停止在块 3365 (在文件 3 中)
ORA-01151: 如果需要, 请使用介质恢复以恢复块和还原备份
SQL> select open_mode from v$database;
OPEN_MODE
----------
MOUNTED
SQL> select file#,name from v$datafile where file#=3;
FILE#
----------
NAME
--------------------------------------------------------------------------------
3
D:\ORACLE\ORADATA\ORCL\UNDOTBS01.DBF
SQL> recover datafile 3;
完成介质恢复。
SQL> alter database open;
数据库已更改。
数据库已经关闭。
已经卸载数据库。
ORACLE 例程已经关闭。
SQL> startup mount
ORACLE 例程已经启动。
Total System Global Area 535662592 bytes
Fixed Size 1334380 bytes
Variable Size 138412948 bytes
Database Buffers 390070272 bytes
Redo Buffers 5844992 bytes
数据库装载完毕。
SQL>
重新启动一下就可以了,不过整个过程比较耗时间,所以在介质修复的时候要有点耐心。