日期:2014-05-16  浏览次数:20501 次

oracle 索引出错解决方法

【jdbc的错误】ORA-01502: index 'XXXX' or partition of such index is in unusable state

【解决方法】

select index_name from user_indexes where status = 'UNUSABLE'

选中结果集,copy到eclipse里,使用正则替换成一下sql

alter index ${index_name} rebuild

然后执行替换后的语句

PS:参考正则

regexp: ^(.*)$

replaceBy: alter index $1 rebuild;

?

?

?

?