ORA-20000:index is in unusable

dingzihan發表於2014-07-08
上午在進行例行資料庫檢查時,發現如下報錯資訊:
Mon Jul 07 22:00:56 2014
GATHER_STATS_JOB encountered errors.  Check the trace file.
Errors in file /u01/app/oracle/diag/rdbms/uniora/uniora/trace/uniora_j002_29328.trc:
ORA-20000: index "HJZXMBGGMT"."INDEX_BUSI_ADVICE_FORM_ID"  or partition of such index is in unusable state

檢視索引的狀態:
SQL> select owner,index_name,index_type,table_owner,table_name,tablespace_name,
  2  status,last_analyzed from dba_indexes where status='UNUSABLE';


OWNER                          INDEX_NAME
------------------------------ ------------------------------
INDEX_TYPE                  TABLE_OWNER
--------------------------- ------------------------------
TABLE_NAME
------------------------------
TABLESPACE_NAME
--------------------------------------------------------------------------------
STATUS   LAST_ANALYZED
-------- ------------------
HJZXMBGGMT                     INDEX_BUSI_ADVICE_FORM_ID
NORMAL                      HJZXMBGGMT
CC_BUSI_ADVICE


OWNER                          INDEX_NAME
------------------------------ ------------------------------
INDEX_TYPE                  TABLE_OWNER
--------------------------- ------------------------------
TABLE_NAME
------------------------------
TABLESPACE_NAME
--------------------------------------------------------------------------------
STATUS   LAST_ANALYZED
-------- ------------------
HJZX
UNUSABLE 03-SEP-13

重建索引:
SQL> alter index HJZXMBGGMT.INDEX_BUSI_ADVICE_FORM_ID rebuild;


Index altered.


SQL> alter index HJZXMBGGMT.CC_BUSI_FORM_PIID rebuild;


Index altered.

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/22969361/viewspace-1212304/,如需轉載,請註明出處,否則將追究法律責任。

相關文章