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

最近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/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/25801738/viewspace-702675/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值