Home > Database > Mysql Tutorial > body text

ash停止不动无法产生报告问题解决

WBOY
Release: 2016-06-07 15:59:15
Original
1272 people have browsed it

1、数据库版本 oracle 11.2.0.3.0 2、问题现象 使用ashrpt.sql生成ash报告时,在输入完成起始时间、指定报告文件存放路径与文件名称后,静止无反应。 SQL @?/rdbms/admin/ashrpt.sql ...... Using the report name /home/oracle/ashrpt_1_0802_1932.html Sum

1、数据库版本

oracle 11.2.0.3.0

2、问题现象

使用ashrpt.sql生成ash报告时,在输入完成起始时间、指定报告文件存放路径与文件名称后,静止无反应。

SQL> @?/rdbms/admin/ashrpt.sql

......

Using the report name

/home/oracle/ashrpt_1_0802_1932.html

Summary of All User Input

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

Format : HTML

DB Id : 2024181297

Inst num : 1

Begin time : 02-Aug-14 19:22:34

End time : 02-Aug-14 19:32:34

Slot width : Default

Report targets : 0

Report name : /home/oracle/ashrpt_1_0802_1932.html

停在这里不动了......

3、问题分析

3.1、查看ashrpt会话在等待什么

SQL> select sid,program,event from v$session where sid=1590;

SID PROGRAM EVENT

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

1590 sqlplus@nosql1 (TNS V1-V3) control file sequential read

待待事件持续为“control filesequential read”

3.2、查看optimizer_mode参数设置值

SQL> show parameter optimizer_mode

NAME TYPE VALUE

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

optimizer_mode string FIRST_ROWS_10

发现optimizer_mode并非为默认值all_rows,而是被修改成了first_rows_10

3.3 分析初步小结

根据上面等待事件的不正常性,以及optimizer_mode被修改的值相结合,怀疑很有可能是ORACLE的BUG。

4、分析结果验证

在metalink上,查到文章13794366.8 ,确认为ORACLE 11.2.0.2、11.2.0.3上因为设置参数OPTIMIZER_MODE=FIRST_ROWS_N的BUG ,在11.2.0.4上解决。

Description

ASH reports can take a really long to complete if the optimizer_mode parameter 
Copy after login
is set to FIRST_ROWS_N
Copy after login
<strong><u>Rediscovery Notes</u></strong>
Copy after login
 ASH reports will take a long time to complete when optimizer_mode parameter is
Copy after login
 set to FIRST_ROWS_N
Copy after login
<strong><u>Workaround</u></strong>
Copy after login
 None
Copy after login

5、解决方法

为了不因为修改optimizer_mode参数对系统其它方面造成影响,所以选择在创建ash报告的session级别修改参数值为"all_rows"的方式,达到能成功生成ash报告的目的

SQL> alter session set optimizer_mode='all_rows';

SQL> @?/rdbms/admin/ashrpt.sql

......

End of Report

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!