今天,开发人员碰到一个问题,在PL/SQL中调用存储过程时报600错,之所以出现此问题,是因为在跑此存储过程时卡住了,于是直接关掉PL/SQL,再重新打开软件,发现问题,于是开发那边重启oracle实例(还好是开发环境)。。
报错如图:
看到这个图,毫无疑问,不好解决,先看ALERT吧
摘抄:
Errors in file /home/oracle/app/diag/rdbms/orcl/orcl/trace/orcl_ora_3625.trc (incident=38596):
ORA-00600: internal error code, arguments: [kdsgrp1], [], [], [], [], [], [], [], [], [], [], []
Use ADRCI or Support Workbench to package the incident.
See Note 411.1 at My Oracle Support for error and packaging details.
直接提示ADRCI。。。
再看TRACE文件:
*** 2015-07-03 10:39:04.076
*** SESSION ID:(980.2401) 2015-07-03 10:39:04.076
*** CLIENT ID:() 2015-07-03 10:39:04.076
*** SERVICE NAME:(SYS$USERS) 2015-07-03 10:39:04.076
*** MODULE NAME:(sqlplus@localhost.localdomain (TNS V1-V3)) 2015-07-03 10:39:04.076
*** ACTION NAME:() 2015-07-03 10:39:04.076
* kdsgrp1-1: *************************************************
row 0x00414da6.37 continuation at
0x00414da6.37 file# 1 block# 85414 slot 55 not found
KDSTABN_GET: 0 ..... ntab: 1
curSlot: 55 ..... nrows: 251
kdsgrp - dump CR block dba=0x00414da6
Block header dump: 0x00414da6
Object id on Block? Y
seg/obj: 0x69 csc: 0x00.16984295 itc: 2 flg: - typ: 1 - DATA
fsl: 0 fnx: 0x0 ver: 0x01
Itl Xid Uba Flag Lck Scn/Fsc
0x01 0x0008.007.00003c65 0x00c00c4c.09a9.3b --U- 49 fsc 0x0768.16984297
0x02 0x000f.016.00001a88 0x00c044fd.03fb.63 C--- 0 scn 0x0000.16983e46
bdba: 0x00414da6
data_block_dump,data header at 0x10987005c
===============
tsiz: 0x1fa0
hsiz: 0x208
pbl: 0x10987005c
76543210
flag=--------
ntab=1
nrow=251
* kdsgrp1-2: *************************************************
DDE: Problem Key 'ORA 600 [kdsgrp1]' was flood controlled (0x4) (incident: 38596)
ORA-00600: internal error code, arguments: [kdsgrp1], [], [], [], [], [], [], [], [], [], [], []
* kdsgrp1-1: *************************************************
*** 2015-07-03 13:45:07.007
row 0x00414da6.37 continuation at
0x00414da6.37 file# 1 block# 85414 slot 55 not found
KDSTABN_GET: 0 ..... ntab: 1
curSlot: 55 ..... nrows: 251
kdsgrp - dump CR block dba=0x00414da6
Block header dump: 0x00414da6
Object id on Block? Y
seg/obj: 0x69 csc: 0x00.16984295 itc: 2 flg: - typ: 1 - DATA
fsl: 0 fnx: 0x0 ver: 0x01
Itl Xid Uba Flag Lck Scn/Fsc
0x01 0x0008.007.00003c65 0x00c00c4c.09a9.3b --U- 49 fsc 0x0768.16984297
0x02 0x000f.016.00001a88 0x00c044fd.03fb.63 C--- 0 scn 0x0000.16983e46
bdba: 0x00414da6
如红色字体,提示 file# 1 block# 85414 slot 55 not found,于是在网上各种搜索。
根据网络上提供的信息:
1、根据文件号,块号 找到此数据块是哪个表,啊个索引:
SQL> select owner,file_id,segment_name, segment_type, block_id, blocks from dba_extents
where file_id=1 and block_id<=85414 and (block_id + blocks- 1) >= 85414;
OWNER FILE_ID SEGMENT_NAME SEGMENT_TYPE BLOCK_ID BLOCKS
------------------------------ ---------- --------------------------------------------------------------------------------- ------------------ ---------- ----------
SYS 1 SOURCE$ TABLE 85376 128
很明显,问题出在SOURCE$这张基表上,那么这张表是干什么用的呢?原来此表存储的是 存储过程、函数等源码,所对应的视图有:user_source、all_source、dba_source等,那么就有可能是:内存中有逻辑坏块?于是先执行 alter system flush buffer_cache;
再查看存储过程,还是报600错。
2、再试其他方法 执行 :
*
ERROR at line 1:
ORA-01499: table/index cross reference failure - see trace file
DDE: Problem Key 'ORA 600 [kdsgrp1]' was flood controlled (0x4) (incident: 39341)
ORA-00600: internal error code, arguments: [kdsgrp1], [], [], [], [], [], [], [], [], [], [], []
row mismatch in index tsn: 0 rdba: 0x00400638
Rfile# Block#
---------- ----------
1 1592
SQL> select owner, segment_name, segment_type from dba_segments where header_file =1 and header_block = 1592;
no rows selected