加载中…
个人资料
  • 博客等级:
  • 博客积分:
  • 博客访问:
  • 关注人气:
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
正文 字体大小:

ORA-20000问题的解决办法

(2010-02-20 14:26:44)
标签:

杂谈

分类: 随笔

由于移动了IC_JSDB的分区所以的表空间,导致了

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.

相关网站:
http://mfm088.itpub.net/post/22599/214126
http://read.newbooks.com.cn/info/153795.html
http://www.getdbahelp.com/OracleErrors/Oracle-Errors-details.php?recordID=00004

0

阅读 收藏 喜欢 打印举报/Report
  

新浪BLOG意见反馈留言板 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 产品答疑

新浪公司 版权所有