ORA-01502: index or partition of such index is in usable state problem

Faced a similar issue.

If you just need to get rid of the error, do:

SELECT 'ALTER INDEX '||OWNER||'.'||INDEX_NAME||' REBUILD;'
FROM DBA_INDEXES
WHERE STATUS = 'UNUSABLE';

This will output ALTER INDEX ... REBUILD; statements for all "unusable" indexes. Run them, so that the indexes can be "usable" again.


From the documentation you link to:

UNIQUE constraints are verified when indexes are rebuilt at the end of the load. The index is left in an Index Unusable state if it violates a UNIQUE constraint.

They way I read it, the same applies to PRIMARY KEY constraints though the wording is a little ambiguous. You might not like this behaviour, but it is not "a bug" as it is behaving as designed - and there are other ways of ending up with this sort of 'broken' constraint.

See this OTN post for more information and an approach that might work better for you using pl/sql and forall ... save exceptions.