# 问题描述
在执行数据导出操作时,出现ORA-00600内部错误,具体错误信息如下:
DW00 started with pid=612, OS id=201014, wid=1, job SYS.SYS_EXPORT_SCHEMA_07
Errors in file /oracle/app/diag/rdbms/hisdb/hisdb2/trace/hisdb2_dw00_201014.trc (incident=1830893):
ORA-00600: internal error code, arguments: [qosdExpStatRead: expcnt mismatch], [65540], [4], [77632], [1], [], [], [], [], [], [], []
Use ADRCI or Support Workbench to package the incident.
See Note 411.1 at My Oracle Support for error and packaging details.
Errors in file /oracle/app/diag/rdbms/hisdb/hisdb2/trace/hisdb2_dw00_201014.trc (incident=1876099):
ORA-00600: internal error code, arguments: [qosdExpStatRead: expcnt mismatch], [65540], [4], [77632], [1], [], [], [], [], [], [], []
ORA-06512: at "SYS.DBMS_STATS", line 2141
ORA-06512: at "SYS.DBMS_STATS", line 57576
ORA-06512: at "SYS.DBMS_STATS", line 57809
ORA-06512: at "SYS.KUPW$WORKER", line 29962
ORA-06512: at "SYS.KUPW$WORKER", line 3493
ORA-06512: at "SYS.KUPW$WORKER", line 13736
ORA-06512: at "SYS.KUPW$WORKER", line 2429
ORA-06512: at line 2
Use ADRCI or Support Workbench to package the incident.
See Note 411.1 at My Oracle Support for error and packaging details.
# 错误分析
该错误是由于sys.exp_obj$表中的exp_cnt值与sys.exp_stat$表中对应记录的数量不匹配导致的。具体来说:
- 错误参数[qosdExpStatRead: expcnt mismatch]表明在读取导出统计信息时发现计数不匹配
- 参数[65540]、[4]、[77632]、[1]分别表示相关的内部标识符
- 错误堆栈显示问题发生在数据泵导出过程中,涉及DBMS_STATS包
# 处理步骤
结合
MOS文档ORA-00600 [qosdExpStatRead: expcnt mismatch] Still Happens Even After Applied both Patch 28681153 and Patch 31143146 (Doc ID 2803002.1)中提到的两种解决方案:
我们这次采用方法1,修改基表的方式,修改后报错解决。
## 1. 查找不匹配的记录
执行以下SQL查询,找出`exp_obj$`和`exp_stat$`表中数据不匹配的记录:
with b as (
select count(*) cnt,objn,snapshot_id from sys.exp_stat$ es group by
objn,snapshot_id)
select * from sys.exp_obj$ a,b where a.objn=b.objn and a.snapshot_id=b.snapshot_id
and a.Exp_Cnt<>b.cnt;
## 2. 修复不匹配的数据
根据查询结果,执行以下SQL语句修复不匹配的数据:
-- 删除exp_stat$表中对应记录
delete from sys.exp_stat$ b where b.snapshot_id=1 and b.objn=77632;
-- 更新exp_obj$表中的exp_cnt值
update sys.exp_obj$ a set a.exp_cnt=0 where a.snapshot_id=1 and a.objn=77632;
-- 提交更改
commit;
## 3. 验证修复结果
修复后,重新执行数据导出操作,验证错误是否已解决。
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/29956245/viewspace-3116134/ ,如需转载,请注明出处,否则将追究法律责任。