<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>惜分飞 &#187; ORA-06502</title>
	<atom:link href="https://www.xifenfei.com/tag/ora-06502/feed" rel="self" type="application/rss+xml" />
	<link>https://www.xifenfei.com</link>
	<description>提供7*24专业数据库(Oracle,SQL Server,MySQL,PostgreSQL等)恢复和技术支持@Tel:17813235971</description>
	<lastBuildDate>Tue, 27 Oct 2026 15:30:55 +0000</lastBuildDate>
	<language>zh-CN</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>ORACLE 11.2.0.3 生成awr html文件报SYS.DBMS_WORKLOAD_REPOSITORY异常</title>
		<link>https://www.xifenfei.com/2012/10/oracle-11-2-0-3-%e7%94%9f%e6%88%90awr-html%e6%96%87%e4%bb%b6%e6%8a%a5sys-dbms_workload_repository%e5%bc%82%e5%b8%b8.html</link>
		<comments>https://www.xifenfei.com/2012/10/oracle-11-2-0-3-%e7%94%9f%e6%88%90awr-html%e6%96%87%e4%bb%b6%e6%8a%a5sys-dbms_workload_repository%e5%bc%82%e5%b8%b8.html#comments</comments>
		<pubDate>Mon, 22 Oct 2012 15:38:32 +0000</pubDate>
		<dc:creator><![CDATA[惜分飞]]></dc:creator>
				<category><![CDATA[ORA-xxxxx]]></category>
		<category><![CDATA[ORA-06502]]></category>
		<category><![CDATA[ORA-06512]]></category>

		<guid isPermaLink="false">https://www.xifenfei.com/?p=3930</guid>
		<description><![CDATA[联系：手机/微信(+86 17813235971) QQ(107644445)  &#8230; <a href="https://www.xifenfei.com/2012/10/oracle-11-2-0-3-%e7%94%9f%e6%88%90awr-html%e6%96%87%e4%bb%b6%e6%8a%a5sys-dbms_workload_repository%e5%bc%82%e5%b8%b8.html">继续阅读 <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<div id="xifenfeicopyright">
<p>联系：<a href="https://www.xifenfei.com/about_xifenfei" target="_blank">手机/微信(+86 17813235971)   QQ(107644445)</a><a target="_blank" href="http://wpa.qq.com/msgrd?v=3&#038;uin=107644445&#038;site=qq&#038;menu=yes"><img src="https://www.xifenfei.com/wp-content/themes/img/site_qq.jpg" alt="QQ咨询惜分飞" title="QQ咨询惜分飞"/></a></p>
<p>标题：<a href="https://www.xifenfei.com/2012/10/oracle-11-2-0-3-%e7%94%9f%e6%88%90awr-html%e6%96%87%e4%bb%b6%e6%8a%a5sys-dbms_workload_repository%e5%bc%82%e5%b8%b8.html" target="_blank">ORACLE 11.2.0.3 生成awr html文件报SYS.DBMS_WORKLOAD_REPOSITORY异常</a></p>
<p>作者：<a href="https://www.xifenfei.com" target="_blank">惜分飞</a>©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]</p>
</div>
<p>在想分析数据库性能的关键时刻,突然发现awr不能正常的工作,那就和你上了战场突然发现枪没有子弹一样的郁闷,今天就遇到了11.2.0.3在win的环境中awr生成html不能正常工作.通过查询mos发现该问题出现在各种平台中(win,linux,aix等),提醒大家注意该问题.<br />
<strong>数据库版本</strong></p>
<pre class="brush: sql; title: ; notranslate">
SQL&gt; SELECT * FROM V$VERSION;

BANNER
-------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
PL/SQL Release 11.2.0.3.0 - Production
CORE    11.2.0.3.0      Production
TNS for 32-bit Windows: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - Production
</pre>
<p><strong>awr报错(html)</strong></p>
<pre class="brush: sql; title: ; notranslate">
SQL&gt; @?/rdbms/admin/awrrpt.sql
ORA-06502: PL/SQL: 数字或值错误 :  字符串缓冲区太小
ORA-06512: 在 &quot;SYS.DBMS_WORKLOAD_REPOSITORY&quot;, line 919
ORA-06512: 在 line 1
</pre>
<p><strong>设置errorstack</strong></p>
<pre class="brush: sql; title: ; notranslate">
SQL&gt; alter session set events '6502 trace name errorstack level 12';

会话已更改。
</pre>
<p><strong>分析错误</strong></p>
<pre class="brush: bash; title: ; notranslate">
----- Error Stack Dump -----
ORA-06502: PL/SQL: 数字或值错误 :  字符串缓冲区太小
----- Current SQL Statement for this session (sql_id=572fbaj0fdw2b) -----
select output from table(dbms_workload_repository.awr_report_html( :dbid,
                                                            :inst_num,
                                                            :bid, :eid,
                                                            :rpt_options ))


----- PL/SQL Call Stack -----
  object      line  object
  handle    number  name
94348684       919  package body SYS.DBMS_WORKLOAD_REPOSITORY
983BAD54         1  anonymous block
----- Call Stack Trace -----
_skdstdst()+121      CALLrel  _kgdsdst()           19D99520 2
_ksedst1()+93        CALLrel  _skdstdst()          19D99520 0 1 485816 4863B2
                                                   485816
_ksedst()+49         CALLrel  _ksedst1()           0 1
_dbkedDefDump()+368  CALLrel  _ksedst()            0
6                                                  
_ksedmp()+44         CALLrel  _dbkedDefDump()      C 0
_dbkdaKsdActDriver(  CALLreg  00000000             C
)+4209                                             
…………
</pre>
<p>通过查询mos发现Bug 13575143一致，可以确定是该bug,但是通过进一步测试证明不光是awrrpt会出现该错误,awr的相关报告中,只要是展示html结果的都有可能出现类此错误(比如awrrpti.sql/awrddrpt.sql/awrddrpi.sql等等).同时这里通过进一步分析发现其实该bug的起源是Bug 6458801(REPLACE on a CLOB can corrupt multibyte data ID 6458801.8),不过该bug说明已经在11.2.0.1中修复,其实通过这里的分析发现并没有真正的在11.2.0.3中修复该bug,针对该问题没有官方没有提供较好解决方法,只能是用过WORKAROUND来临时解决</p>
<pre class="brush: bash; title: ; notranslate">
They are able to generate the AWR report in the .txt format  
</pre>
<div id="crp_related"><ul><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/06/%e5%9b%a0%e4%bd%bf%e7%94%a8oem%e5%bc%95%e8%b5%b7ora-0060012761.html" rel="bookmark" class="crp_title">因使用OEM引起ORA-00600[12761]</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/08/%e5%88%9b%e5%bb%ba%e6%8e%a7%e5%88%b6%e6%96%87%e4%bb%b6%e9%81%ad%e9%81%87ora-006003753%e6%95%85%e9%9a%9c%e8%a7%a3%e5%86%b3.html" rel="bookmark" class="crp_title">创建控制文件遭遇ORA-00600[3753]故障解决</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/06/%e5%8a%a8%e6%80%81%e4%bf%ae%e6%94%b9pga_aggregate_target-%e5%af%bc%e8%87%b4ora-600723.html" rel="bookmark" class="crp_title">动态修改PGA_AGGREGATE_TARGET 导致ORA-600[723]</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2018/12/ora-00704-ora-00604-ora-00942.html" rel="bookmark" class="crp_title">ORA-00704  ORA-00604 ORA-00942故障恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/06/ora-39126-%e5%9c%a8-kupwworker-put_ddls-table_statistics-%e4%b8%ad-worker-%e5%8f%91%e7%94%9f%e6%84%8f%e5%a4%96%e8%87%b4%e5%91%bd%e9%94%99%e8%af%af.html" rel="bookmark" class="crp_title">ORA-39126: 在 KUPW$WORKER.PUT_DDLS [TABLE_STATISTICS] 中 Worker 发生意外致命错误</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/10/%e9%87%8d%e5%bb%badbms_stats%e5%8c%85.html" rel="bookmark" class="crp_title">重建DBMS_STATS包</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/05/%e4%bd%bf%e7%94%a8dbms_metadata-get_ddl%e5%87%ba%e7%8e%b0ora-31605%e9%94%99%e8%af%af.html" rel="bookmark" class="crp_title">使用dbms_metadata.get_ddl出现ORA-31605错误</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2023/10/ora-600-4000.html" rel="bookmark" class="crp_title">再现ORA-600 4000故障处理</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2019/08/delete-wri_adv_sqlt_rtn_plan-error.html" rel="bookmark" class="crp_title">DELETE FROM wri$_adv_sqlt_rtn_planWHERE task_id = :tid AND exec_name = :execution_name</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2014/09/mos%e5%8f%88%e4%b8%80%e6%ac%a1%e4%b8%8d%e9%9d%a0%e8%b0%b1-ora-27163-out-of-memory.html" rel="bookmark" class="crp_title">MOS又一次不靠谱&#8212;ORA-27163: out of memory</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/02/ora-00600ktspnextl14.html" rel="bookmark" class="crp_title">ORA-00600[ktspNextL1:4]</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/05/%e4%bd%bf%e7%94%a8dblink%e5%af%bc%e8%87%b4%e7%9a%84-opaque_transform.html" rel="bookmark" class="crp_title">使用dblink导致的/*+ OPAQUE_TRANSFORM */</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>https://www.xifenfei.com/2012/10/oracle-11-2-0-3-%e7%94%9f%e6%88%90awr-html%e6%96%87%e4%bb%b6%e6%8a%a5sys-dbms_workload_repository%e5%bc%82%e5%b8%b8.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
