eygle.com   eygle.com
eygle.com eygle
eygle.com  
 

« Oracle Exadata在全球部署超过1000台 | Blog首页 | Oracle数据恢复:ORA-600 kdsgrp1错误解决案例 »

Oracle数据恢复:断电导致的ORA-600 6006错误

上周,有个客户的系统,因为机房停电,预先关闭数据库,但是启动后却遭遇了ORA-600 6006 错误,数据库无法启动.

这是比较郁闷的事情,经过我们的恢复,最后成功启动数据库,恢复了数据库应用,但是整个过程值得记录一下.

同时提醒大家:断电对于数据库系统的伤害极大,应当做好充分的准备和预防工作.

基本的错误信息如下:
Fri Jul  1 14:06:22 2011
Errors in file /DBMS/PCMRK/LOG/ADMIN/bdump/pcmrk_smon_12252.trc:
ORA-00600: internal error code, arguments: [6006], [1], [], [], [], [], [], []
Fri Jul  1 14:06:23 2011
ORACLE Instance PCMRK (pid = 9) - Error 600 encountered while recovering transaction (11, 25) on object 577.
Fri Jul  1 14:06:23 2011
Errors in file /DBMS/PCMRK/LOG/ADMIN/bdump/pcmrk_smon_12252.trc:
ORA-00600: internal error code, arguments: [6006], [1], [], [], [], [], [], []
Fri Jul  1 14:11:12 2011
Error 12541 received logging on to the standby
Check whether the listener is up and running.
Fri Jul  1 14:11:12 2011
Errors in file /DBMS/PCMRK/LOG/ADMIN/bdump/pcmrk_arc1_12829.trc:
ORA-12541: TNS:no listener
PING[ARC1]: Heartbeat failed to connect to standby 'PCMRK_N'. Error is 12541.
Fri Jul  1 14:16:12 2011
Error 12541 received logging on to the standby
Check whether the listener is up and running.
Fri Jul  1 14:16:12 2011
Errors in file /DBMS/PCMRK/LOG/ADMIN/bdump/pcmrk_arc1_12829.trc:
ORA-12541: TNS:no listener
PING[ARC1]: Heartbeat failed to connect to standby 'PCMRK_N'. Error is 12541.

ORA-600 6006错误的含义是指,当数据库尝试撤销一个索引叶键值操作时,发现这个键值根本不存在,这通常和介质损坏或磁盘写丢失,或者磁盘损坏相关.

由于其问题来自索引,所以通常可以通过重建或者删除索引来解决这个问题.
  Oracle is undoing an index leaf key operation.  If the key is not found,  ORA-00600 [6006] is logged.
  
  ORA-600[6006] is usually caused by a media corruption problem related to either a  lost write to disk or a corruption on disk.


错误信息中的关键内容是:
Error 600 encountered while recovering transaction (11, 25) on object 577

对象号为577,在Oracle数据库中,这个对象是SMON_SCN_TIME_SCN_IDX索引,这个索引的表是SMON_SCN_TIME,对于这个表我们应当非常熟悉,是建立SCN和时间对应关系的字典表,用于闪回和数据恢复等.这个索引无关紧要,可以重建:
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
With the Partitioning and Data Mining options

SQL> select object_name from dba_objects where object_id=577;

OBJECT_NAME
--------------------------------------------------------------------------------
SMON_SCN_TIME_SCN_IDX
重建这个索引并未解决问题,数据库又出现了如下错误:
Fri Jul  1 16:18:56 2011
Errors in file /DBMS/PCMRK/LOG/ADMIN/bdump/pcmrk_smon_9157.trc:
ORA-00600: internal error code, arguments: [kddummy_blkchk], [2], [16137], [38508], [], [], [], []
replication_dependency_tracking turned off (no async multimaster replication found)

错误信息指出,需要恢复的事务位于11号回滚段.

我们注释这个回滚段:
  _offline_rollback_segments= _SYSSMU11$
  _corrupted_rollback_segments= _SYSSMU11$

在跟踪文件中可以看到这个回滚段的相关信息,其中存在一个需要回滚的活动事务:

Block Checking: DBA = 8404745, Block Type = System Managed Segment Header Block
ERROR: SMU Segment Header Corrupted.  Error Code = 38508
ktu4smck: starting extent(0x2) of txn slot #0x19 is  invalid.
  valid value (0 - 0x1)
  TRN CTL:: seq: 0x0263 chd: 0x0008 ctl: 0x000e inc: 0x00000000 nfb: 0x0000
            mgc: 0x8201 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe)
            uba: 0x0080571c.0262.02 scn: 0x056c.eef8cc9e
            Version: 0x01
  FREE BLOCK POOL::
    uba: 0x00000000.0262.0a  ext: 0xb  spc: 0x1372  
    uba: 0x00000000.0262.24  ext: 0xb  spc: 0x10ca  
    uba: 0x00000000.0262.01  ext: 0xb  spc: 0x1d94  
    uba: 0x00000000.0247.15  ext: 0xd  spc: 0x1928  
    uba: 0x00000000.0000.00  ext: 0x0  spc: 0x0     
  TRN TBL::
  index  state cflags  wrap#    uel         scn            dba            parent-xid    nub       bcl     cmt
  -----------------------------------------------------------------------------------------
   0x00    9    0x00  0x1aa2  0x0025  0x056c.eef8cd35  0x00805724  0x0000.000.00000000  0x00000001   0x00000000    1290845124
   0x01    9    0x00  0x1aa3  0x0005  0x056c.eef8cca4  0x00805723  0x0000.000.00000000  0x00000001   0x00000000    1290844806
   0x02    9    0x00  0x1aa3  0x0012  0x056c.eef8cd51  0x00805724  0x0000.000.00000000  0x00000001   0x00000000    1290845124
   0x03    9    0x00  0x1a9e  0x001f  0x056c.eef8cd3b  0x00805724  0x0000.000.00000000  0x00000001   0x00000000    1290845124
   0x04    9    0x00  0x1a9f  0x0024  0x056c.eef8cd54  0x00805724  0x0000.000.00000000  0x00000001   0x00000000    1290845124
   0x05    9    0x00  0x1aa1  0x0015  0x056c.eef8cca9  0x00805724  0x0000.000.00000000  0x00000002   0x00000000    1290844806
   0x06    9    0x00  0x1aa4  0x000e  0x056c.eef8d01d  0x00805726  0x0000.000.00000000  0x00000001   0x00000000    1290847222
   0x07    9    0x00  0x1a9d  0x0003  0x056c.eef8cd38  0x00805724  0x0000.000.00000000  0x00000001   0x00000000    1290845124
   0x08    9    0x00  0x1aa3  0x0001  0x056c.eef8cca0  0x00805723  0x0000.000.00000000  0x00000001   0x00000000    1290844806
   0x09    9    0x00  0x1aa1  0x001b  0x056c.eef8cd3f  0x00805724  0x0000.000.00000000  0x00000001   0x00000000    1290845124
   0x0a    9    0x00  0x1aa3  0x002a  0x056c.eef8cd28  0x00805724  0x0000.000.00000000  0x00000001   0x00000000    1290845124
   0x0b    9    0x00  0x1aa4  0x0013  0x056c.eef8cd43  0x00805724  0x0000.000.00000000  0x00000001   0x00000000    1290845124
   0x0c    9    0x00  0x1aa6  0x0006  0x056c.eef8cfb8  0x00805726  0x0000.000.00000000  0x00000002   0x00000000    1290846924
   0x0d    9    0x00  0x1aa2  0x0009  0x056c.eef8cd3d  0x00805724  0x0000.000.00000000  0x00000001   0x00000000    1290845124
   0x0e    9    0x00  0x1aa6  0xffff  0x056c.efa4527e  0x00000000  0x0000.000.00000000  0x00000000   0x00000000    1294211432
   0x0f    9    0x00  0x1aa0  0x0029  0x056c.eef8cd1c  0x00805724  0x0000.000.00000000  0x00000001   0x00000000    1290845124
   0x10    9    0x00  0x1aa3  0x0016  0x056c.eef8cd23  0x00805724  0x0000.000.00000000  0x00000001   0x00000000    1290845124
   0x11    9    0x00  0x1aa1  0x001e  0x056c.eef8cd1e  0x00805724  0x0000.000.00000000  0x00000001   0x00000000    1290845124
   0x12    9    0x00  0x1a9f  0x0004  0x056c.eef8cd52  0x00805724  0x0000.000.00000000  0x00000001   0x00000000    1290845124
   0x13    9    0x00  0x1a9d  0x001c  0x056c.eef8cd44  0x00805724  0x0000.000.00000000  0x00000001   0x00000000    1290845124
   0x14    9    0x00  0x1aa0  0x0002  0x056c.eef8cd50  0x00805724  0x0000.000.00000000  0x00000001   0x00000000    1290845124
   0x15    9    0x00  0x1aa3  0x000f  0x056c.eef8cd1b  0x00805724  0x0000.000.00000000  0x00000001   0x00000000    1290845124
   0x16    9    0x00  0x1aa1  0x0020  0x056c.eef8cd24  0x00805724  0x0000.000.00000000  0x00000001   0x00000000    1290845124
   0x17    9    0x00  0x1aa3  0x002d  0x056c.eef8cd48  0x00805724  0x0000.000.00000000  0x00000001   0x00000000    1290845124
   0x18    9    0x00  0x1aa2  0x0022  0x056c.eef8ceea  0x00805725  0x0000.000.00000000  0x00000001   0x00000000    1290846324
   0x19   10    0x10  0x1aa4  0x0002  0x056c.eef8d0e8  0x00805726  0x0000.000.00000000  0x00000001   0x00000000    0
   0x1a    9    0x00  0x1aa1  0x0007  0x056c.eef8cd37  0x00805724  0x0000.000.00000000  0x00000001   0x00000000    1290845124
   0x1b    9    0x00  0x1aa3  0x002b  0x056c.eef8cd41  0x00805724  0x0000.000.00000000  0x00000001   0x00000000    1290845124
   0x1c    9    0x00  0x1aa9  0x0017  0x056c.eef8cd46  0x00805724  0x0000.000.00000000  0x00000001   0x00000000    1290845124
   0x1d    9    0x00  0x1a9f  0x0027  0x056c.eef8cd2b  0x00805724  0x0000.000.00000000  0x00000001   0x00000000    1290845124
   0x1e    9    0x00  0x1aa2  0x0026  0x056c.eef8cd1f  0x00805724  0x0000.000.00000000  0x00000001   0x00000000    1290845124
   0x1f    9    0x00  0x1aa0  0x000d  0x056c.eef8cd3c  0x00805724  0x0000.000.00000000  0x00000001   0x00000000    1290845124
   0x20    9    0x00  0x1a9e  0x0021  0x056c.eef8cd25  0x00805724  0x0000.000.00000000  0x00000001   0x00000000    1290845124
   0x21    9    0x00  0x1aa3  0x000a  0x056c.eef8cd27  0x00805724  0x0000.000.00000000  0x00000001   0x00000000    1290845124
   0x22    9    0x00  0x1aa3  0x000c  0x056c.eef8cfb5  0x00805725  0x0000.000.00000000  0x00000001   0x00000000    1290846921
   0x23    9    0x00  0x1a9f  0x0000  0x056c.eef8cd30  0x00805724  0x0000.000.00000000  0x00000001   0x00000000    1290845124
   0x24    9    0x00  0x1a9f  0x002e  0x056c.eef8ce1e  0x00805725  0x0000.000.00000000  0x00000002   0x00000000    1290845724
   0x25    9    0x00  0x1a9f  0x001a  0x056c.eef8cd36  0x00805724  0x0000.000.00000000  0x00000001   0x00000000    1290845124
   0x26    9    0x00  0x1aa2  0x0010  0x056c.eef8cd20  0x00805724  0x0000.000.00000000  0x00000001   0x00000000    1290845124
   0x27    9    0x00  0x1aa0  0x0023  0x056c.eef8cd2c  0x00805724  0x0000.000.00000000  0x00000001   0x00000000    1290845124
   0x28    9    0x00  0x1aa5  0x002c  0x056c.eef8cd4d  0x00805724  0x0000.000.00000000  0x00000001   0x00000000    1290845124
   0x29    9    0x00  0x1aa0  0x0011  0x056c.eef8cd1d  0x00805724  0x0000.000.00000000  0x00000001   0x00000000    1290845124
   0x2a    9    0x00  0x1aa1  0x001d  0x056c.eef8cd2a  0x00805724  0x0000.000.00000000  0x00000001   0x00000000    1290845124
   0x2b    9    0x00  0x1a9e  0x000b  0x056c.eef8cd42  0x00805724  0x0000.000.00000000  0x00000001   0x00000000    1290845124
   0x2c    9    0x00  0x1aa3  0x0014  0x056c.eef8cd4e  0x00805724  0x0000.000.00000000  0x00000001   0x00000000    1290845124
   0x2d    9    0x00  0x1aa0  0x0028  0x056c.eef8cd4b  0x00805724  0x0000.000.00000000  0x00000001   0x00000000    1290845124
   0x2e    9    0x00  0x1aa2  0x002f  0x056c.eef8cee6  0x00805725  0x0000.000.00000000  0x00000001   0x00000000    1290846321
   0x2f    9    0x00  0x1aa4  0x0018  0x056c.eef8cee8  0x00805725  0x0000.000.00000000  0x00000001   0x00000000    1290846324
TYP:0 CLS:37 AFN:2 DBA:0x00803f09 OBJ:4294967295 SCN:0x056c.f29c192b SEQ:  1 OP:14.4
kteop redo - redo operation on extent map
   DELETE: entry:2
   shift back: dba:0x0 len:0 
   SETSTAT: exts:2 blks:15 lastmap:0x0 mapcnt:0
   UPDXNT: extent:2 add:FALSE
 
Block after image:
buffer rdba: 0x00803f09
scn: 0x056c.f29c192b seq: 0x01 flg: 0x04 tail: 0x192b2601
frmt: 0x02 chkval: 0xb36a type: 0x26=KTU SMU HEADER BLOCK
Hex dump of corrupt header 3 = CHKVAL

然后尝试删除这个回滚段,遇到ORA-600 kddummy_blkchk错误:
Fri Jul  1 16:12:26 2011
drop rollback segment "_SYSSMU11$"
Fri Jul  1 16:12:27 2011
Errors in file /DBMS/PCMRK/LOG/ADMIN/udump/pcmrk_ora_740.trc:
ORA-00600: internal error code, arguments: [kddummy_blkchk], [2], [16137], [38508], [], [], [], []
Fri Jul  1 16:12:29 2011
Doing block recovery for file 2 block 16137
Block recovery from logseq 378, block 91 to scn 5965484943524
Fri Jul  1 16:12:29 2011
Recovery of Online Redo Log: Thread 1 Group 3 Seq 378 Reading mem 0
  Mem# 0: /DBMS/PCMRK/DATA01/redo03a.dbf
  Mem# 1: /DBMS/PCMRK/DATA02/redo03b.dbf
Block recovery stopped at EOT rba 378.92.16
Block recovery completed at rba 378.92.16, scn 1388.4070336675
ORA-607 signalled during: drop rollback segment "_SYSSMU11$"...

最后通过删除UNDO表空间,创建新的UNDO表空间的方式恢复了数据库运行:
Fri Jul  1 16:41:32 2011
drop tablespace undotbs1
Doing block recovery for file 2 block 16137
Block recovery from logseq 386, block 20 to scn 5967857138334
Fri Jul  1 16:41:33 2011
Recovery of Online Redo Log: Thread 1 Group 2 Seq 386 Reading mem 0
  Mem# 0: /DBMS/PCMRK/DATA01/redo02a.dbf
  Mem# 1: /DBMS/PCMRK/DATA02/redo02b.dbf
Block recovery completed at rba 386.32.16, scn 1389.2147564191
Fri Jul  1 16:41:33 2011
Errors in file /DBMS/PCMRK/LOG/ADMIN/bdump/pcmrk_smon_1073.trc:
ORA-00607: Internal error occurred while making a change to a data block
ORA-00600: internal error code, arguments: [kddummy_blkchk], [2], [16137], [38508], [], [], [], []
Fri Jul  1 16:41:33 2011
Starting control autobackup
Control autobackup written to DISK device
    handle '/DBMS/PCMRK/product/10g/dbs/c-3258818890-20110701-01'
Completed: drop tablespace undotbs1
Fri Jul  1 16:42:44 2011
create undo tablespace undotbs1 datafile '/DBMS/PCMRK/DATA01/undotbs01.dbf' size 20M autoextend on maxsize unlimited
Fri Jul  1 16:42:44 2011
ORA-1119 signalled during: create undo tablespace undotbs1 datafile '/DBMS/PCMRK/DATA01/undotbs01.dbf' size 20M autoextend on maxsize unlimited...
Fri Jul  1 16:43:03 2011
 create undo tablespace undotbs1 datafile '/DBMS/PCMRK/DATA01/undotbs02.dbf' size 20M autoextend on maxsize unlimited
Fri Jul  1 16:43:03 2011
Starting control autobackup
Control autobackup written to DISK device
    handle '/DBMS/PCMRK/product/10g/dbs/c-3258818890-20110701-02'
Completed:  create undo tablespace undotbs1 datafile '/DBMS/PCMRK/DATA01/undotbs02.dbf' size 20M autoextend on maxsize unlimited
Fri Jul  1 16:43:39 2011
Shutting down instance: further logons disabled

在这个案例中,你需要判断这个事务的重要性,能否安全移除,这是最为重要的一点判断.



历史上的今天...
    >> 2017-07-06文章:
    >> 2010-07-06文章:
    >> 2009-07-06文章:
    >> 2007-07-06文章:
    >> 2006-07-06文章:
           开始架设Oracle10gR2 RAC系统
           朋友公司招聘一名DBA
    >> 2005-07-06文章:
           剑桥飞雪

无觅

By eygle on 2011-07-06 11:38 | Comments (5) | Backup&Recovery | 2833 |

5 Comments

"错误信息指出,需要恢复的事务位于11号回滚段."
哪个错误信息中呢?具体点

"错误信息指出,需要恢复的事务位于11号回滚段."
哪个错误信息中呢?具体点

前面说数据库无法启动,如何能重建索引呢?

一开始说数据库无法启动,如何还能重建索引?难道写错了?


CopyRight © 2004~2020 云和恩墨,成就未来!, All rights reserved.
数据恢复·紧急救援·性能优化 云和恩墨 24x7 热线电话:400-600-8755 业务咨询:010-59007017-7040 or 7037 业务合作: marketing@enmotech.com