如果索引的逻辑块受到损坏,那么oracle在插入数据到该块的时候将会遇到ORA-600 (6002)的错误。
MOS上给出了这个错误的模拟方法及其解决方法:
Microsoft Windows XP [版本 5.1.2600]
(C) 版权所有 1985-2001 Microsoft Corp.
(C) 版权所有 1985-2001 Microsoft Corp.
E:\Documents and Settings\yansp>cd c:\
E:\Documents and Settings\yansp>cd e:\
E:\>net start oracleserviceyansp
OracleServiceyansp 服务正在启动 .
OracleServiceyansp 服务已经启动成功。
OracleServiceyansp 服务正在启动 .
OracleServiceyansp 服务已经启动成功。
E:\>sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on 星期日 4月 22 11:27:05 2012
Copyright (c) 1982, 2005, Oracle. All rights reserved.
ERROR:
ORA-12560: TNS: 协议适配器错误
ORA-12560: TNS: 协议适配器错误
请输入用户名:
ERROR:
ORA-12560: TNS: 协议适配器错误
请输入用户名:
ERROR:
ORA-12560: TNS: 协议适配器错误
SP2-0157: 在 3 次尝试之后无法连接到 ORACLE, 退出 SQL*Plus
E:\>set oracle_sid=yansp
E:\>sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on 星期日 4月 22 11:27:20 2012
Copyright (c) 1982, 2005, Oracle. All rights reserved.
已连接到空闲例程。
SQL> startup
ORACLE 例程已经启动。
Total System Global Area 1073741824 bytes
Fixed Size 1250044 bytes
Variable Size 696257796 bytes
Database Buffers 369098752 bytes
Redo Buffers 7135232 bytes
Fixed Size 1250044 bytes
Variable Size 696257796 bytes
Database Buffers 369098752 bytes
Redo Buffers 7135232 bytes
数据库装载完毕。
数据库已经打开。
SQL> conn test/test
已连接。
SQL> create table A1 (
2 C1 number(2),
3 C2 date,
4 constraint A1KEY primary key (
5 c1
6 ) using index local
7 )
8 partition by range (c1) (
9 partition P1 values less than (5),
10 partition P2 values less than (maxvalue)
11 )
12 ;
表已创建。
SQL> alter table A1 move partition
2 P2 compress update indexes ( A1KEY (partition P2));
2 P2 compress update indexes ( A1KEY (partition P2));
表已更改。
SQL> insert into A1 values (0, sysdate);
已创建 1 行。
SQL> insert into A1 values (5, sysdate);
insert into A1 values (5, sysdate)
*
第 1 行出现错误:
ORA-00600: 内部错误代码, 参数: [6002], [6], [0], [1], [0], [], [], []
SQL> alter index a1key rebuild partition p1 online;
索引已更改。
SQL> alter index a1key rebuild partition p2 online;
索引已更改。
SQL> insert into A1 values (5, sysdate);
已创建 1 行。
SQL>
具体可以参考MOS: ID 6621940.8