Chinaunix首页 | 论坛 | 博客
  • 博客访问: 288369
  • 博文数量: 60
  • 博客积分: 1437
  • 博客等级: 中尉
  • 技术积分: 632
  • 用 户 组: 普通用户
  • 注册时间: 2011-02-10 14:12
文章存档

2012年(7)

2011年(53)

分类: Oracle

2011-02-12 10:00:21

用户数据库不能打开,Alert log中报如下错误:
Fri Oct  3 20:02:27 2008
Errors in file /u01/oracle/admin/caq/bdump/caq_lgwr_2060404.trc:
ORA-00345: redo log write error block 152320 count 57
ORA-00312: online log 3 thread 1: '/u01/oracle/oradata/caq/redo03.log'
ORA-27063: skgfospo: number of bytes read/written is incorrect
IBM AIX RISC System/6000 Error: 110: Media surface error
Additional information: -1
Additional information: 29184
Fri Oct  3 20:02:28 2008
Errors in file /u01/oracle/admin/caq/bdump/caq_lgwr_2060404.trc:
ORA-00340: IO error processing online log 3 of thread 1
ORA-00345: redo log write error block 152320 count 57
ORA-00312: online log 3 thread 1: '/u01/oracle/oradata/caq/redo03.log'
ORA-27063: skgfospo: number of bytes read/written is incorrect
IBM AIX RISC System/6000 Error: 110: Media surface error
Additional information: -1
Additional information: 29184
LGWR: terminating instance due to error 340
Fri Oct  3 20:02:28 2008
Errors in file /u01/oracle/admin/caq/bdump/caq_pmon_2068688.trc:
ORA-00340: IO error processing online log  of thread
Fri Oct  3 20:02:29 2008
Errors in file /u01/oracle/admin/caq/bdump/caq_dbw0_2097222.trc:
ORA-00340: IO error processing online log  of thread
Fri Oct  3 20:02:30 2008
Errors in file /u01/oracle/admin/caq/bdump/caq_ckpt_2031842.trc:
ORA-00340: IO error processing online log  of thread
Fri Oct  3 20:02:38 2008
Instance terminated by LGWR, pid = 2060404

问题诊断:redo online log损坏,并且确认是current状态的redo log.

解决过程:
1. 启动数据库到mount状态下,从spfile文件创建pfile文件
Create pfile=’/u01/oracle/pfile.ora’ from spfile;
2. 因为online redo log所在的Disk中有坏块,所以不能简单的设置_ALL_RESETLOGS_CORRUPTION=TRUE然后resetlogs打开数据库就ok了,需要重建控制文件将redo log reset到其它完好的Disk上,然后resetlogs打开数据库。(这里重建控制文件主要是将日志重建到阵列上,原来是放在本地磁盘的rootvg中,rootvg并没有做镜像。)
(可能不需要重建控制文件)
Tue Oct  7 01:36:19 2008
RESETLOGS is being done without consistancy checks. This may result
in a corrupted database. The database should be recreated.
RESETLOGS after incomplete recovery UNTIL CHANGE 5687982655
Resetting resetlogs activation ID 629466185 (0x2584e449)
Online log 1 of thread 1 was previously cleared
Online log 2 of thread 1 was previously cleared
Tue Oct  7 01:36:19 2008
Errors in file /u01/oracle/admin/caq/udump/caq_ora_2011302.trc:
ORA-00313: open failed for members of log group 3 of thread 1
ORA-00312: online log 3 thread 1: '/u01/oracle/oradata/caq/redo03.log'
ORA-27037: unable to obtain file status
IBM AIX RISC System/6000 Error: 2: No such file or directory
Additional information: 3
/* 以上错误消息说明redo03.log没有找到,但是下面的消息似乎说明redo03.log应该是重建成功了!
*/

Tue Oct  7 01:36:24 2008
Assigning activation ID 629419807 (0x25842f1f)
Thread 1 opened at log sequence 1
Current log# 3 seq# 1 mem# 0: /u01/oracle/oradata/caq/redo03.log
Successful open of redo thread 1.
Tue Oct  7 01:36:25 2008
SMON: enabling cache recovery
/* 如果redo03.log文件重建成功,那么不能resetlogs打开数据库的本质原因应该是下面的错误导致的
*/

Tue Oct  7 01:36:25 2008
Errors in file /u01/oracle/admin/caq/udump/caq_ora_2011302.trc:
ORA-00600: internal error code, arguments: [2662], [1], [1393015364], [1], [1393016039], [8388617], [], []
Tue Oct  7 01:36:26 2008
Errors in file /u01/oracle/admin/caq/udump/caq_ora_2011302.trc:
ORA-00600: internal error code, arguments: [2662], [1], [1393015364], [1], [1393016039], [8388617], [], []
Tue Oct  7 01:36:26 2008
Error 600 happened during db open, shutting down database
USER: terminating instance due to error 600
/*
看来错误确实是ORA-600[2662]引起来的,后面的重建控制文件的步骤是多余的了,nnd
*/

Tue Oct  7 01:36:27 2008
Errors in file /u01/oracle/admin/caq/bdump/caq_pmon_2215976.trc:
ORA-00600: internal error code, arguments: [], [], [], [], [], [], [], []
Tue Oct  7 01:36:28 2008
Errors in file /u01/oracle/admin/caq/bdump/caq_dbw0_2080998.trc:
ORA-00600: internal error code, arguments: [], [], [], [], [], [], [], []
Tue Oct  7 01:36:28 2008
Errors in file /u01/oracle/admin/caq/bdump/caq_lgwr_2121866.trc:
ORA-00600: internal error code, arguments: [], [], [], [], [], [], [], []
Tue Oct  7 01:36:36 2008
Instance terminated by USER, pid = 2011302
ORA-1092 signalled during: alter database open resetlogs...
Tue Oct  7 01:41:34 2008
USER: terminating instance due to error 1092
Instance terminated by USER, pid = 2011302
Tue Oct  7 01:41:34 2008
Errors in file /u01/oracle/admin/caq/udump/caq_ora_2011302.trc:
ORA-27302: failure occurred at: skgpwreset1
ORA-27303: additional information: invalid shared ctx
ORA-01092: ORACLE instance terminated. Disconnection forced
ORA-00600: internal error code, arguments: [2662], [1], [1393015364], [1], [1393016039], [8388617], [], []

先解决ORA-600[2662]错误,metalink 28929.1 说是数据块的SCN大于数据库当前的SCN(A data block SCN is ahead of the current SCN)。
可以通过ORACLE内部事件ADJUST_SCN来增加当前的SCN值:
alter session set events '10015 trace name adjust_scn level 10'; --增加10 billion

重新打开数据库,这时数据库改报ORA-600[4193]错误了:
Tue Oct  7 02:07:09 2008
Errors in file /u01/oracle/admin/caq/bdump/caq_smon_2027644.trc:
ORA-01595: error freeing extent (3) of rollback segment (1))
ORA-00607: Internal error occurred while making a change to a data block
ORA-00600: internal error code, arguments: [4193], [6438], [6448], [], [], [], [], []

这是redo record与undo record不一致造成的。新建一个undo tablespace替换掉旧的undo即可!
参考metalink 39282.1

create undo tablespace undotbs2
datafile '/oracaq/oradata/caq/undotbs02.dbf' size 60M

由于数据库是使用pfile文件启动的,所以需要关闭数据库,设置undo_tablespace = UNDOTBS2,顺便把_ALL_RESETLOGS_CORRUPTION=TRUE去掉!启动数据库,新建database的默认临时表空间,然后执行数据库的完全导出,用导出的dmp文件新建数据库。

阅读(2272) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~