insert select执行报ora-600 [32695]

问题描述

应用人员报障说每月都在执行的一个sql今天突然怎么也执行不下去,并报如下错误:

ORA-00600: internal error code, arguments: [32695], [hash aggregation can't be done], [], [], [], [], [], []

操作系统为SUNOS 5.10,Oracle版本为:10.2.0.4.0,单机环境
执行的SQL语句为:
INSERT INTO MID_DM_RPT_COMP_SUB_PROD_M SELECT COMP_AREA_ID, COMP_CITY_ID.....省略....
经查询mos并找到如下文档ORA-600 [32695] [hash aggregation can't be done] (文档 ID 729447.1) 该文档给出的解决办法如下: 禁用hash group by
SQL> alter system set "_gby_hash_aggregation_enabled"=false scope=spfile; SQL> alter session set "_gby_hash_aggregation_enabled"=false;
通过在SQL语句中添加hint NO_USE_HASH_AGGREGATION绕过bug
SQL> select /*+ NO_USE_HASH_AGGREGATION */....
后来用户也是通过临时在SQL中添加hint临时绕过bug运行的程序。 通过文档(Bug 6471770 - ora-32690/OERI [32695] [hash aggregation can't be done] from Hash GROUP BY (文档 ID 6471770.8))确认: 该bug影响的版本有:
10.2.0.4 10.2.0.3
已被修复的版本:
11.2.0.1 (Base Release) 11.1.0.7 (Server Patch Set) 10.2.0.5 (Server Patch Set) 10.2.0.4 Patch 5 on Windows Plantforms 10.2.0.3 Patch 23 on Windows Plantforms
另外,对于单独修复该bug的补丁,我查了下,只有Solaris平台:

Leave Comment