ORA-01502: index 'INDEX_NAME' or partition of such index is in unusable state
原因:
这个错误一般是因为索引状态为UNUSABLE
引起的。你可以通过下面SQL,查看索引的状态
解决办法:
SELECT OWNER, INDEX_NAME,STATUS FROM DBA_INDEXES WHERE INDEX_NAME='INDEX_NAME';
SELECT OWNER, INDEX_NAME,STATUS FROM ALL_INDEXES WHERE INDEX_NAME='INDEX_NAME';
SELECT INDEX_NAME,STATUS FROM USER_INDEXES WHERE INDEX_NAME='INDEX_NAME';
重建索引即可
ALTER INDEX INDEX_NAME REBUILD
时间: 2024-09-20 08:09:05