ORA-01502: 索引或索引的分区处于不可用状态

这个问题的原因是索引失效,

select index_name ,status  from user_indexes where Status = 'UNUSABLE'
可以查询出失效的索引

通过
select 'alter index ' || index_name || ' rebuild;' from user_indexes where Status = 'UNUSABLE'

可以构建重建索引的sql语句

猜你喜欢

转载自peijunlin2008.iteye.com/blog/2228840