ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 越南alert错误1—中ORA-20000问题的解决办法

越南alert错误1—中ORA-20000问题的解决办法

原创 Linux操作系统 作者:wangsir_918 时间:2011-07-20 17:16:46 0 删除 编辑

最近XXX项目,越南节点的DB服务器出现大量的:

ORA-20000: index "ZXDBM_890"."IDX_STAT_FACT_ORDER_USERID"  or partition of such index is in unusable state

XXX项目是XXX的决策系统,OLAP,传说中的数据仓库,运用了很多oracle高级技术:分区、并行执行等。

粗率分析应该是分区索引失效导致的,由于现网工程还无法联系上,还无法定位。网络上有类似的解决方案,如下

ALTER INDEX "BUSINESS"."IDX_IC_JSDB_PART"
    REBUILD
    PARTITION "P2010_2"
    TABLESPACE "INDEX01"

导致如下错误
Fri Feb 19 22:04:03 2010
Errors in file /u01/oracle/admin/bxrac/bdump/bxrac4_j002_29756.trc:
ORA-20000: index "BUSINESS"."IDX_IC_JSDB_PART"  or partition of such index is in unusable state

检查index的状态
SQL> select status from dba_indexes where index_name='IDX_IC_JSDB_PART';

STATUS
------------------------
N/A

手工执行分析脚本;
SQL> exec dbms_stats.gather_table_stats('business','IC_JSDB');
BEGIN dbms_stats.gather_table_stats('business','IC_JSDB'); END;

*
ERROR at line 1:
ORA-20000: index "BUSINESS"."IDX_IC_JSDB_PART"  or partition of such index is
in unusable state
ORA-06512: at "SYS.DBMS_STATS", line 13437
ORA-06512: at "SYS.DBMS_STATS", line 13457
ORA-06512: at line 1

解决办法:
重新建立
SQL> alter index IDX_IC_JSDB_PART rebuild online;

Index altered.

测试分析脚本是否可用
SQL> exec dbms_stats.gather_table_stats('business','IC_JSDB');

 

处理问题参考:
--------------------------------------------------------------------------------------------------------------
ORA-20000 - index "SCOTT"."SSMTEST _U0" or partition of such index is in unusable state. During generating
gather statistics on table.

ORA-20000: index "SCOTT"."SSMTEST_U0"  or partition of such
index is in unusable state
ORA-06512: at "SYS.DBMS_STATS", line 13189
ORA-06512: at "SYS.DBMS_STATS", line 13209
ORA-06512: at line 1

The general for this error I came across is having duplicate rows in table.

Use following steps to reslove this error.  

1) Find out dpulicate rows from table.  

2) drop index

3) delete duplicate rows from table.  

4) Re-Create Index.

5) Generate statistic on table.

 

另外:南沙是我们的

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/25801738/viewspace-702675/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2011-07-18

  • 博文量
    40
  • 访问量
    77834