<?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-20000</title>
	<atom:link href="https://www.xifenfei.com/tag/ora-20000/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>Sun, 25 Oct 2026 13:02:42 +0000</lastBuildDate>
	<language>zh-CN</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>Some indexes or index [sub]partitions of table VAS.TAB_PUB_CALLLOG have been marked unusable</title>
		<link>https://www.xifenfei.com/2011/12/some-indexes-or-index-subpartitions-of-table-vas-tab_pub_calllog-have-been-marked-unusable.html</link>
		<comments>https://www.xifenfei.com/2011/12/some-indexes-or-index-subpartitions-of-table-vas-tab_pub_calllog-have-been-marked-unusable.html#comments</comments>
		<pubDate>Mon, 05 Dec 2011 05:27:40 +0000</pubDate>
		<dc:creator><![CDATA[惜分飞]]></dc:creator>
				<category><![CDATA[ORA-xxxxx]]></category>
		<category><![CDATA[ORA-20000]]></category>

		<guid isPermaLink="false">https://www.xifenfei.com/?p=2028</guid>
		<description><![CDATA[联系：手机/微信(+86 17813235971) QQ(107644445)  &#8230; <a href="https://www.xifenfei.com/2011/12/some-indexes-or-index-subpartitions-of-table-vas-tab_pub_calllog-have-been-marked-unusable.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/2011/12/some-indexes-or-index-subpartitions-of-table-vas-tab_pub_calllog-have-been-marked-unusable.html" target="_blank">Some indexes or index [sub]partitions of table VAS.TAB_PUB_CALLLOG have been marked unusable</a></p>
<p>作者：<a href="https://www.xifenfei.com" target="_blank">惜分飞</a>©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]</p>
</div>
<p><strong>1、检查alert日志发现错误</strong></p>
<pre class="brush: bash; title: ; notranslate">Wed Nov 30 13:36:47 2011
Some indexes or index [sub]partitions of table VAS.TAB_PUB_CALLLOG have been marked unusable
Wed Nov 30 13:36:48 2011
Some indexes or index [sub]partitions of table VAS.TAB_PUB_CALLLOG have been marked unusable
Wed Nov 30 13:36:48 2011
Some indexes or index [sub]partitions of table VAS.TAB_PUB_CALLLOG have been marked unusable
Wed Nov 30 13:36:49 2011
Some indexes or index [sub]partitions of table VAS.TAB_PUB_CALLLOG have been marked unusable
Wed Nov 30 13:36:50 2011
Some indexes or index [sub]partitions of table VAS.TAB_PUB_CALLLOG have been marked unusable
Wed Nov 30 13:36:51 2011
Some indexes or index [sub]partitions of table VAS.TAB_PUB_CALLLOG have been marked unusable
Wed Nov 30 13:36:52 2011
Some indexes or index [sub]partitions of table VAS.TAB_PUB_CALLLOG have been marked unusable
Wed Nov 30 13:36:52 2011
Some indexes or index [sub]partitions of table VAS.TAB_PUB_CALLLOG have been marked unusable
Wed Nov 30 13:36:53 2011
Some indexes or index [sub]partitions of table VAS.TAB_PUB_CALLLOG have been marked unusable
Wed Nov 30 13:36:54 2011
Some indexes or index [sub]partitions of table VAS.TAB_PUB_CALLLOG have been marked unusable
Wed Nov 30 13:36:55 2011
Some indexes or index [sub]partitions of table VAS.TAB_PUB_CALLLOG have been marked unusable
Wed Nov 30 13:36:56 2011
Some indexes or index [sub]partitions of table VAS.TAB_PUB_CALLLOG have been marked unusable
Wed Nov 30 13:36:56 2011
Some indexes or index [sub]partitions of table VAS.TAB_PUB_CALLLOG have been marked unusable
Wed Nov 30 13:36:57 2011
Some indexes or index [sub]partitions of table VAS.TAB_PUB_CALLLOG have been marked unusable
Wed Nov 30 13:36:57 2011
Some indexes or index [sub]partitions of table VAS.TAB_PUB_CALLLOG have been marked unusable
Wed Nov 30 13:36:58 2011
Some indexes or index [sub]partitions of table VAS.TAB_PUB_CALLLOG have been marked unusable
Wed Nov 30 13:37:12 2011
Some indexes or index [sub]partitions of table VAS.TAB_PUB_CALLLOG have been marked unusable
Wed Nov 30 22:00:09 2011
…………
Wed Nov 30 22:00:15 2011
GATHER_STATS_JOB encountered errors.  Check the trace file.
Wed Nov 30 22:00:15 2011
Errors in file /opt/oracle/admin/ora9i/bdump/ora9i_j001_21372.trc:
ORA-20000: index &quot;VAS&quot;.&quot;XN_CALLLOG_ANALYSIS_PK&quot;  or partition of such index is in unusable state
</pre>
<p><strong>2、查看trace文件</strong></p>
<pre class="brush: bash; title: ; notranslate">/opt/oracle/admin/ora9i/bdump/ora9i_j001_21372.trc
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORACLE_HOME = /opt/oracle/product/10.2.0/db_1
System name:    Linux
Node name:      localhost.localdomain
Release:        2.6.18-92.el5
Version:        #1 SMP Tue Apr 29 13:16:15 EDT 2008
Machine:        x86_64
Instance name: ora9i
Redo thread mounted by this instance: 1
Oracle process number: 42
Unix process pid: 21372, image: oracle@localhost.localdomain (J001)

*** 2011-11-30 22:00:15.782
*** ACTION NAME:(GATHER_STATS_JOB) 2011-11-30 22:00:15.763
*** MODULE NAME:(DBMS_SCHEDULER) 2011-11-30 22:00:15.763
*** SERVICE NAME:(SYS$USERS) 2011-11-30 22:00:15.763
*** SESSION ID:(532.60095) 2011-11-30 22:00:15.763
ORA-20000: index &quot;VAS&quot;.&quot;XN_CALLLOG_ANALYSIS_PK&quot;  or partition of such index is in unusable state
*** 2011-11-30 22:00:15.782
GATHER_STATS_JOB: GATHER_TABLE_STATS('&quot;VAS&quot;','&quot;TAB_XN_CALLLOG_ANALYSIS&quot;','&quot;&quot;', ...)
ORA-20000: index &quot;VAS&quot;.&quot;XN_CALLLOG_ANALYSIS_PK&quot;  or partition of such index is in unusable state
</pre>
<p><strong>3、日志初步结论</strong><br />
通过alert日志，感觉应该是对分区表操作，导致&#8221;VAS&#8221;.&#8221;XN_CALLLOG_ANALYSIS_PK&#8221;索引变成了unusable state，然后在数据库自动收集统计信息的时候报错(最大可能是全局index导致)<br />
<br />
<strong>4、验证猜测是否正确</strong></p>
<pre class="brush: sql; title: ; notranslate">SQL&gt; SELECT owner,index_name,table_name,status FROM DBA_indexes 
   2 WHERE index_name='XN_CALLLOG_ANALYSIS_PK' AND owner='VAS';
 
OWNER                          INDEX_NAME                     TABLE_NAME                     STATUS
------------------------------ ------------------------------ ------------------------------ --------
VAS                            XN_CALLLOG_ANALYSIS_PK         TAB_XN_CALLLOG_ANALYSIS        UNUSABLE
</pre>
<p><strong>5、解决相关问题问题</strong></p>
<pre class="brush: sql; title: ; notranslate">SELECT 'ALTER INDEX ' || INDEX_OWNER || '.' || INDEX_NAME ||
'REBUILD PARTITION ' || PARTITION_NAME || ' NOLOGGING online;'
FROM DBA_IND_PARTITIONS
WHERE INDEX_OWNER NOT IN ('SYS', 'SYSTEM', 'PUBLIC')
AND STATUS = 'UNUSABLE'
UNION ALL
SELECT 'alter index ' ||OWNER || '.' || A.INDEX_NAME || ' REBUILD online nologging;'
FROM DBA_INDEXES A
WHERE OWNER NOT IN ('SYS', 'SYSTEM', 'PUBLIC')
AND STATUS = 'UNUSABLE';
</pre>
<p>执行生成sql，解决相关index unusable问题</p>
<div id="crp_related"><ul><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2011/12/ora-1502%e9%97%ae%e9%a2%98%e5%88%86%e6%9e%90%e8%a7%a3%e5%86%b3.html" rel="bookmark" class="crp_title">ORA-1502问题分析解决</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2017/11/move-lob-index-unusable.html" rel="bookmark" class="crp_title">move lob导致index失效</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2013/08/oracle-12c-partial-globallocal-indexes-for-partitioned-tables.html" rel="bookmark" class="crp_title">ORACLE 12C Partial Global/Local Indexes for Partitioned Tables</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2011/12/%e8%ae%b0%e5%bd%95%e4%b8%80%e6%ac%a1oer-8102-2%e5%a4%84%e7%90%86.html" rel="bookmark" class="crp_title">记录一次oer 8102.2处理</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/01/obj%e5%9d%8f%e5%9d%97%e6%83%85%e5%86%b5%e4%b8%8bexp%e5%af%bc%e5%87%ba%e5%8d%95%e4%b8%aa%e8%a1%a8%e8%a7%a3%e5%86%b3%e6%96%b9%e6%a1%88.html" rel="bookmark" class="crp_title">obj$坏块情况下exp导出单个表解决方案</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2010/12/oracle%e8%a1%a8%e4%b8%89%e7%a7%8d%e9%93%be%e6%8e%a5.html" rel="bookmark" class="crp_title">oracle表三种链接</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/03/%e5%85%b3%e4%ba%8esmon_scn_time%e8%8b%a5%e5%b9%b2%e9%97%ae%e9%a2%98%e8%af%b4%e6%98%8e.html" rel="bookmark" class="crp_title">关于SMON_SCN_TIME若干问题说明</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2011/04/oracle%e5%88%86%e5%8c%ba%e8%a1%a8%e7%ae%a1%e7%90%86.html" rel="bookmark" class="crp_title">Oracle分区表管理</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2011/12/%e8%ae%b0%e4%b8%80%e6%ac%a1%e5%90%aband-equal%e6%89%a7%e8%a1%8c%e8%ae%a1%e5%88%92%e8%b0%83%e4%bc%98.html" rel="bookmark" class="crp_title">记一次含AND-EQUAL执行计划调优</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2011/05/mysql%e5%88%9b%e5%bb%ba%e5%88%86%e5%8c%ba%e8%a1%a8.html" rel="bookmark" class="crp_title">MySql创建分区表</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/12/oracle-12c-%e6%94%af%e6%8c%81multiple-partitions%e5%90%8c%e6%97%b6%e6%93%8d%e4%bd%9c.html" rel="bookmark" class="crp_title">ORACLE 12C 支持multiple partitions同时操作</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2011/09/10g%e6%96%b0%e5%a2%9e%e5%88%97%e6%96%b9%e5%bc%8f%e6%8c%87%e5%ae%9ahint.html" rel="bookmark" class="crp_title">10g新增列方式指定HINT</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>https://www.xifenfei.com/2011/12/some-indexes-or-index-subpartitions-of-table-vas-tab_pub_calllog-have-been-marked-unusable.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
