How do you fix Ora-01502 index or partition of such index is usable state?

How do you fix Ora-01502 index or partition of such index is usable state?

The ORA-01502 error can be easily fixed by issuing the alter index index_name rebuild partition partition_name; To learn how to rebuild unusable partitioned indexes see these notes on Oracle index partition management.

How do I fix the partition of such index in the unusable state?

Rebuild Index Oracle INDEX_NAME REBUILD; If you want to rebuild all unusable indexes, you can use the following script. SELECT ‘ALTER INDEX ‘||OWNER||’. ‘||INDEX_NAME||’ REBUILD;’ FROM DBA_INDEXES WHERE STATUS = ‘UNUSABLE’;

What causes Ora-01502 index or partition of such index is in unusable state?

Article outlines an Oracle error ‘ORA-01502: index `…` or partition of such index is in unusable state’ that occurs when attempting to edit a MicroStrategy object. If the TEMP tablespace does not have sufficient space, all rows will still be loaded and imported, but the indices are left with a STATUS = ‘INVALID’.

How do I make an index usable?

Making an Index Unusable

  1. Query the data dictionary to determine whether an existing index or index partition is usable or unusable.
  2. Make an index or index partition unusable by specifying the UNUSABLE keyword.
  3. Optionally, query the data dictionary to verify the status change.

How do I make an index partition usable?

How to resolve ora-01502 : index or partition is in usable?

ORA-01502 ORA-01502 means that the index that the optimizer want to use is in UNUSABLE state, you can either rebuild it or work around it. Let’s see a case that can reproduce the error. SQL> TRUNCATE TABLE PAY_HIST;

What does ora-01502 mean in Oracle Database?

I got ” ORA-01502 index or partition of such index is in usable state ” error in Oracle database. Details of error are as follows. The ORA-01438 error is related with the unusable state of Index. If the related index (es) are unusable, then you can drop these indexes or rebuild indexes as follows.

Is it possible to skip an index in ora-01502?

Now, you will be able to set this parameter at session level and instance level as well. By setting the value of the skip_unusable_indexes=true, the optimizer selects an execution plan that does not utilize unusable indexes, preventing ORA-01502 errors. However, when you skip an index you risk getting a sub-optimal SQL execution plan.

Is the ora-01438 error related to the unusable index?

The ORA-01438 error is related with the unusable state of Index. If the related index (es) are unusable, then you can drop these indexes or rebuild indexes as follows. You can drop the unusable index as follows. To solve The ORA-01502 error, You should rebuild index as follows.