断电导致ORACLE数据库出现ORA-00600 4194 undo损坏报错的处理过程
断电导致ORACLE数据库出现ORA-00600 4194 undo损坏报错的处理过程
数据库断电后,启动到mount状态时报ORA-00600: internal error code, arguments: [kcratr1_lastbwr]
错误,然后按 startup mount; recover database; alter database open; 打开后,
但查询相关视图时报ora-03113错误, desc 某个表名时,也报强制断开连接错误
然后就查alert.log日志文件,里面内容如下:
Tue Mar 17 17:10:40 2009
Doing block recovery for file 2 block 2610
Block recovery from logseq 105001, block 78 to scn 7719204736317
Tue Mar 17 17:10:40 2009
Recovery of Online Redo Log: Thread 1 Group 3 Seq 105001 Reading mem 0
Mem# 0 errs 0: D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\REDO03.LOG
Block recovery completed at rba 105001.86.16, scn 1797.1148505406
Doing block recovery for file 2 block 73
Block recovery from logseq 105001, block 78 to scn 7719204736305
Tue Mar 17 17:10:40 2009
Recovery of Online Redo Log: Thread 1 Group 3 Seq 105001 Reading mem 0
Mem# 0 errs 0: D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\REDO03.LOG
Block recovery completed at rba 105001.78.16, scn 1797.1148505394
Tue Mar 17 17:10:41 2009
Errors in file d:\oracle\product\10.2.0\admin\orcl\bdump\orcl_smon_1856.trc:
ORA-01595: error freeing extent (3) of rollback segment (5))
ORA-00607: Internal error occurred while making a change to a data block
ORA-00600: internal error code, arguments: [4194], [10], [10], [], [], [], [], []
不断的报ORA-00600 4194错误,第一个想到的就是 undo已经损坏
需要重建undo,用隐含参数打开了,如果有备份的话,就从备份中恢复了,这里介绍下用隐含参数打
开的方法
首先确定有多少undo回滚段,可以从alert.log日志中查找,如果有多个回滚段,就全部列上去
关闭数据库,修改init
修改init
[td=500]._corrupted_rollback_segments='_SYSSMU1$','_SYSSMU2$','_SYSSMU3$','_SYSSMU4$','_SYSSMU5$'
用修改的init
startup pfile=init
这时能正常启动
此时可以重新创建新的UNDO表空间,删除出现问题的表空间,修改参数文件,由参数文件生成新的spfile,重新启动数据库:
[td=500]SQL> create undo tablespace undotbs1 datafile '/opt/oracle/oradata/conner/undotbs1.dbf' size 10M;Tablespace created.SQL> alter system set undo_tablespace=undotbs1;System altered.
SQL> drop tablespace undotbs2;Tablespace dropped.
修改参数文件,变更undo表空间,并取消_corrupted_rollback_segments设置:
[td=500]*.undo_tablespace='UNDOTBS1'
由参数文件创建spfile文件。
[td=500]SQL> create spfile from pfile;File created.
此时数据库恢复正常,通常建议立即全库exp,然后重新建库,再imp恢复数据库。
最近经历了一次,ups供电不足导致数据库异常关闭而损坏undo的事件。