你好,游客 登录 注册 搜索
背景:
阅读新闻

ORA-00600:[32695], [hash aggregation can't be done] 解决方法

[日期:2012-07-27] 来源:blog.csdn.net/tianlesoftware  作者:tianlesoftware [字体:大 中 小]

二.说明:

MOS 文档:

ORA-600 [32695] [hash aggregation can't bedone] [ID 729447.1]

2.1 Applies to:

Oracle Server -Enterprise Edition - Version: 10.2.0.1 to 11.1.0.6 - Release: 10.2 to 11.1 Informationin this document applies to any platform.
***Checked for relevance on 17-Nov-2011***

2.2 Symptoms

When running astatement that involves a GROUP BY operation, the following error is raised:

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

 

 If we look in the trace file, underCall Stack Trace section, we see the functions:

... qeshPartitionBuildHD qeshGBYOpenScan2qeshGBYOpenScan qerghFetch qervwFetch ...

 

and the query plan for the SQL statementshows a HASH GROUP BY, eg. :

------------------------------------------
| Id |Operation                        |
------------------------------------------
| 0 |INSERTSTATEMENT                  |
| 1 | PXCOORDINATOR                    |
| 2 | PXSEND QC(RANDOM)               |
| 3 |HASH GROUPBY                     |
...

 

A second case where this would occur couldbe with a failing query that has no GROUP BY, but has a Select Distinct. ThePlan table indicates a HASH UNIQUE instead of HASH GROUP BY. 

 

2.3 Cause

This is likely to be a case of unpublishedbug 6471770 - see eg. note:6471770.8- fixed in 10.2.0.5, 11.1.0.7, and 11.2
----导致ORA-600[32685] 可能是bug6471770,其在10.2.0.5,11.1.0.7 和11.2 中已经修复。


A similar problem is reported in:
bug:5893340 ORA-600 [32695], [HASH AGGREGATION CAN'T BE DONE]
- fixed in 10.2.0.4, 11.1.0.6

--导致ORA-600[32685]也可能是bug:5893340,其在10.2.0.4和11.1.0.6中已经修复。

 

2.4 Solution

Solutions are as follows:

在不升级DB的情况下,可以使用如下方法来解决:

 

1) Disable HASH GROUP BY operations bysetting the parameter _gby_hash_aggregation_enabled to FALSE, ie.:

SQL> alter session set"_gby_hash_aggregation_enabled" = false;

 or

SQL> alter systemset "_gby_hash_aggregation_enabled" = falsescope=spfile; 

 

A hard parse tothe statement needs to be performed, preferably to flush the Shared Pool aftersetting this workaround and then re-run the statement.

--要使修改生效,需要执行一次硬解析,所以可以选择flush share pool,然后执行SQL。

 

"_gby_hash_aggregation_enabled" 是Oracle的隐含参数,我们可以使用all_parameters 视图来查询。

 

SQL> select name,value fromall_parameters where name like '_gby_hash_aggregation_%';

 

NAME                                VALUE

--------------------------------------------------

_gby_hash_aggregation_enabled       TRUE

2) Disable HASH GROUP BY operations byusing the hint NO_USE_HASH_AGGREGATION:

--使用hint 禁用Hashgroup by 操作:

SQL> select /*+ NO_USE_HASH_AGGREGATION*/ ...

3) Apply patch:6471770 if available forthe relevant platform/version

--应用Patch:

 

 

For Windows, the patch is included in:
10.2.0.3 patch 23 and later - see note:342443.1
10.2.0.4 patch 5 and later - see note:342443.1

Please note that the patch is crucial toresolve the Second Case of the Symptoms section above, the workarounds will notresolve the issue.

If the error still reproduces followingthese steps, contact the Oracle Support. 

linux
相关资讯       Oracle高级培训 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款