毕照杰(广州)
2003-12-25日,客户数据库因为掉电,数据库不能正常启动。
故障现象:
进入应用程序的时候,提示:Oracle startup or shutdown in progress.....
诊断及解决过程:
1、SVRMGR> startup nomount;
没有问题
2、SVRMGR> alter database mount;
出现在以下内容,乱码:
alter database mount
*
ORA-00214: ???? 'D:\ORACLE\ORADATA\ORACLE\CONTROL02.CTL' ?? 16788 ??? 'D:\ORACLE
\ORADATA\ORACLE\CONTROL01.CTL' ?? 16780 ???
3、为了解决这个乱码,先设置字符集,然后再重新来过一次:
SVRMGR> shutdown abort;
SVRMGR> exit;
c:\set nls_lang=american_america.zhs16gbk
SVRMGR> startup nomount;
4、SVRMGR> alter database mount;
出现以下内容,诊断是几个控制文件版本不一致:
alter database mount
*
ORA-00214: controlfile 'D:\ORACLE\ORADATA\ORACLE\CONTROL02.CTL' version 16788 in
consistent with file 'D:\ORACLE\ORADATA\ORACLE\CONTROL01.CTL' version 16780
解决方法:
打开init.ora,找到
control_files = ("d:\oracle\oradata\oracle\control01.ctl", "d:\oracle\oradata\oracle\control02.ctl", "d:\oracle\oradata\oracle\control03.ctl"
把它修改为:
control_files = ("d:\oracle\oradata\oracle\control02.ctl", "d:\oracle\oradata\oracle\control03.ctl"
去掉其中的第一个控制文件。
5、
SVRMGR>shutdown abort;
SVRMGR>startup nomount;
SVRMGR>alter databse mount;
SVRMGR>alter databse open;
这时出现这样的内容:
alter database open
*
ORA-00314: log 3 of thread 1, expected sequence# 3990 doesn't match 3987
ORA-00312: online log 3 thread 1: 'D:\ORACLE\ORADATA\ORACLE\REDO01.LOG'
诊断,log日志版本不对。
尝试以下操作,均告失败:
SVRMGR> alter database open resetlogs;
出现以下错误:
alter database open resetlogs
*
ORA-01139: RESETLOGS option only valid after an incomplete database recovery
SVRMGR> alter database open noresetlogs;
出现以下错误:
alter database open noresetlogs
*
ORA-01139: RESETLOGS option only valid after an incomplete database recovery
SVRMGR> recover database until time '2003-12-24:19:19:19';
出现以下错误:
ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01194: file 1 needs more recovery to be consistent
ORA-01110: data file 1: 'D:\ORACLE\ORADATA\ORACLE\SYSTEM01.DBF'
SVRMGR> alter database open resetlogs;
出现以下错误:
alter database open resetlogs
*
ORA-01194: file 1 needs more recovery to be consistent
ORA-01110: data file 1: 'D:\ORACLE\ORADATA\ORACLE\SYSTEM01.DBF'
6、
使用ORACLE数据库的部分数据恢复方式。
它的主要做法就是不检查数据库的一致性,来打开数据库,虽然会造成数据的不准确和丢失,
但是还是可以保存在大部分数据的。
做法:
打开init.ora,添加一行文字:
_allow_resetlogs_corruption=true
然后再进行以下操作:
SVRMGR>shutdown abort;
SVRMGR>startup mount;
SVRMGR>recover database until cancel
此时数据库提示
SVRMGR> recover database until cancel;
ORA-00279: change 3684318 generated at 12/30/2003 10:55:34 needed for thread 1
ORA-00289: suggestion : D:\ORACLE\ORA81\RDBMS\ARC00001.001
ORA-00280: change 3684318 for thread 1 is in sequence #1
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
输入 cancel,这时出现这样的信息:
ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01194: file 1 needs more recovery to be consistent
ORA-01110: data file 1: 'D:\ORACLE\ORADATA\ORACLE\SYSTEM01.DBF'
SVRMGR>alter database open noresetlogs;
提示:
Statement processed.
这时,数据库已经起来了。
此时,要尽快把数据库导出来。
exp system/manager file=c:\oracle.dmp full=y ...
在数据库恢复的过程中,多谢 zp_ccc、rockey 、水皮皮 、lgqducky 等各位大侠的帮助。在这里一并谢过了!!!<div align=right><font color=#000066>[此贴子已经被作者于2003-12-30 12:28:01编辑过]</font></div>
浙公网安备 33010602011771号