Wednesday, January 7, 2009

ORA-14086

ORA-14086: a partitioned index may not be rebuilt as a whole

Cause: User attempted to rebuild a partitioned index using ALTER INDEX REBUILD statement, which is illegal.

Action: Rebuild the index, a partition at a time or drop and recreate the entire index.


SQL> ALTER INDEX TEST_ID_IDX REBUILD ONLINE COMPUTE STATISTICS;
ORA-14086: a partitioned index may not be rebuilt as a whole

Rebuilding a partitioned index is slightly different then rebuilding a normal (non-partitioned) index. So you should do this in the following way

SQL> ALTER INDEX TEST_ID_IDX REBUILD PARTITION TEST_2005 ONLINE COMPUTE STATISTICS;

Related Topics:

  1. Rebuilding a partitioned index.

2 comments:

Anonymous said...

Thanx for the post. Here's an sql which gives you the alter statement:
select 'alter index ' ||owner||'.'||index_name|| ' rebuild;' from dba_indexes where status = 'UNUSABLE';
select 'alter index ' ||index_owner||'.'||index_name|| ' rebuild partition ' ||partition_name||';' from dba_ind_partitions where status = 'UNUSABLE';

Anonymous said...

Thank you for the tip...I am newbie and was scratching my head when I saw this error and your blog helped me!