floydd 发表于 2013-1-29 15:21:17

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;
 
 
 
 
页: [1]
查看完整版本: oracle 索引出错解决方法