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

« Oracle数据恢复:断电导致的ORA-600 6006错误 | Blog首页 | 《循序渐进Oracle》第二版已经在Amazon上架 »

Oracle数据恢复:ORA-600 kdsgrp1错误解决案例

在客户的数据库中,恢复之后打开数据库后遇到如下问题,ORA-00600 kdsgrp1错误,这个错误主要指对应索引ROWID,在数据表中找不到记录,这表明出现了数据一致性问题.

我们可以通过重建索引来解决,以下错误提示表明问题出现在file 3 block 32538号数据块上.

以下摘录了一段error stack :
*** ACTION NAME:(Advisor Task Maintenance) 2011-07-12 08:52:46.971
*** MODULE NAME:(MMON_SLAVE) 2011-07-12 08:52:46.971
*** SERVICE NAME:(SYS$BACKGROUND) 2011-07-12 08:52:46.971
*** SESSION ID:(158.5) 2011-07-12 08:52:46.971
            row 00c07f1a.4d continuation at
            file# 3 block# 32538 slot 78 not found
**************************************************
KDSTABN_GET: 0 ..... ntab: 1
curSlot: 78 ..... nrows: 192
**************************************************
*** 2011-07-12 08:52:46.985
ksedmp: internal or fatal error
ORA-00600: internal error code, arguments: [kdsgrp1], [], [], [], [], [], [], []
Current SQL statement for this session:
SELECT T.ID FROM WRI$_ADV_TASKS T, WRI$_ADV_PARAMETERS P WHERE T.ID = P.TASK_ID 
AND T.STATUS <> :B4 AND BITAND(T.PROPERTY, :B3 + :B2 ) = 0 AND P.NAME = 'DAYS_TO
_EXPIRE' AND DECODE(P.NAME, 'DAYS_TO_EXPIRE', DECODE(P.VALUE, 'UNLIMITED', :B1 +
 1, 'UNUSED', T.MTIME + 30, DECODE(TO_NUMBER(P.VALUE), 0, :B1 + 1, T.MTIME + TO_
NUMBER(P.VALUE))), :B1 + 1) < :B1 
我们可以找到这个对象:
SQL> select owner,segment_name,segment_type from dba_extents where file_id=3 and block_id<=32538 and (block_id+blocks)>=32538;

OWNER                          SEGMENT_NAME
------------------------------ ------------------------------
SEGMENT_TYPE
------------------------------------
SYS                            WRI$_ADV_PARAMETERS
TABLE


SQL> select count(*) from WRI$_ADV_PARAMETERS;

  COUNT(*)
----------
     35195
这个对象是AWR的历史表,其数据并不重要,简单点的,我们直接Truncate删掉了所有数据,消除了错误隐患:
SQL> truncate table WRI$_ADV_PARAMETERS;

Table truncated.

如果问题出现在字典表上,则删除数据和重建索引就都不可能,只能通过BBED修改块来完成了.

在第一次启动数据库之后出现如下错误:
Starting background process QMNC
QMNC started with pid=21, OS id=1020126
Tue Jul 12 08:52:46 2011
Completed: ALTER DATABASE OPEN
Tue Jul 12 08:52:46 2011
Errors in file /oracle/so/admin/bdump/so_m000_905446.trc:
ORA-00600: internal error code, arguments: [kdsgrp1], [], [], [], [], [], [], []
Tue Jul 12 08:53:02 2011
Errors in file /oracle/so/admin/bdump/so_m000_905446.trc:
ORA-00600: internal error code, arguments: [kdsgrp1], [], [], [], [], [], [], []
ORA-06512: at "SYS.PRVT_ADVISOR", line 4889
ORA-06512: at line 1
在完成数据清理后,启动数据库,原有的错误就不再出现了:
Database Characterset is ZHS16CGB231280
Opening with internal Resource Manager plan
where NUMA PG = 1, CPUs = 6
replication_dependency_tracking turned off (no async multimaster replication found)
Starting background process QMNC
QMNC started with pid=16, OS id=913466
Tue Jul 12 09:16:08 2011
Completed: ALTER DATABASE OPEN
逐个修正该错误,数据库可以恢复正常运行.

由于AWR数据是较为频繁写入的,所以在断电等故障时最容易遭遇损坏和不一致.

请牢记:断电是数据库的大敌.






历史上的今天...
    >> 2010-07-12文章:
    >> 2008-07-12文章:
           一只熟睡的咪
    >> 2007-07-12文章:
    >> 2006-07-12文章:

无觅

By eygle on 2011-07-12 08:40 | Comments (0) | Backup&Recovery | 2837 |


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