我是靠谱客的博主 务实八宝粥,最近开发中收集的这篇文章主要介绍今天移动表到另一个表空间出现 :ORA-01502 Index state unusable,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

今天无意中看到有几个业务表在system表空间,看着不爽,就移动了这些表到业务表空间。
alter table aplm.T_BG_CUST_VISIT_REPORT_D move  tablespace  APLM_DATA;                                                                                                                                  
alter table aplm.T_BG_CUST_VISIT_REPORT_FILE_D move  tablespace  APLM_DATA;                                                                                                                             
alter table aplm.T_BG_CUST_VISIT_REPORT_FILE_M move  tablespace  APLM_DATA;                                                                                                                             
alter table aplm.T_BG_CUST_VISIT_REPORT_M move  tablespace  APLM_DATA;                                                                                                                                  
alter table aplm.T_CL_PRODUCT_TRACE_D move  tablespace  APLM_DATA;                                                                                                                                      
alter table aplm.T_CL_PRODUCT_TRACE_IMPORT move  tablespace  APLM_DATA;                                                                                                                                 
alter table aplm.T_CL_PRODUCT_TRACE_M move  tablespace  APLM_DATA;                                                                                                                                      
alter table aplm.T_DH_ORDER_ANALYSIS move  tablespace  APLM_DATA;                                                                                                                                       
alter table aplm.T_DH_ORDER_PARTS_ANALYSIS move  tablespace  APLM_DATA;                                                                                                                                 
alter table aplm.T_DH_ORDER_PARTS_IMPORT move  tablespace  APLM_DATA;                                                                                                                                   
alter table aplm.T_JC_PRODUCT_TYPE move  tablespace  APLM_DATA;                                                                                                                                         
alter table aplm.T_JC_PRODUCT_TYPE_SHOPSIGN move  tablespace  APLM_DATA;                                                                                                                                
alter table aplm.T_JC_PRODUCT_TYPE_STEEL move  tablespace  APLM_DATA;                                                                                                                                   
alter table aplm.T_LBJ_PART_IMAGE move  tablespace  APLM_DATA;                                                                                                                                          
alter table aplm.T_LBJ_PART_MGR_IMPORT move  tablespace  APLM_DATA;                                                                                                                                     
alter table aplm.T_SS_CODE_VALUE move  tablespace  APLM_DATA;                                                                                                                                           
alter table aplm.T_SS_CUSTOMER move  tablespace  APLM_DATA;                                                                                                                                             
alter table aplm.T_SS_PERS move  tablespace  APLM_DATA;                                                                                                                                                 
alter table aplm.T_XS_SALES_TRACE move  tablespace  APLM_DATA;                                                                                                                                          
alter table aplm.T_BS_EPS_USERS move  tablespace  APLM_DATA; 
移动完以后,用户插入数据的时候报
ORA-01502: index 'XXXXXXXX' or partition of such index is in unusable state”错误。
 
查看
 select  *   from user_indexes where status = 'UNUSABLE';
发现里面有好多'UNUSABLE'状态的索引

解决办法:
alter session set skip_unusable_indexes=false;
alter index xxxxx rebuild;
重建所有索引;
问题解决

链接: http://space.itpub.net/7551038/viewspace-613707

最后

以上就是务实八宝粥为你收集整理的今天移动表到另一个表空间出现 :ORA-01502 Index state unusable的全部内容,希望文章能够帮你解决今天移动表到另一个表空间出现 :ORA-01502 Index state unusable所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(39)

评论列表共有 0 条评论

立即
投稿
返回
顶部