인덱스의 테이블스페이스를 변경하기위해서 아래와 같은 쿼리를 날렸더니 제목에 쓰인 오류가 났다.
SQL> alter index 인덱스명 rebuild tablespace 테이블스페이스명;
이유인즉슨 인덱스가 파티셔닝이 되어버려서 한번에 rebuild할 수 없다는 얘기
해당 인덱스가 파티셔닝이 되어있는지는 아래와 같은 명령어로 확인할 수 있다.
SQL> select index_name,partitioned from dba_indexes where partitioned='YES' and table_name='테이블명';
자 그럼 어떻게 해야할까?? 인덱스가 파티셔닝이 되었다는 얘기는 테이블이 파티셔닝이 되어있다는 얘기같은데....그럼 이제 이 인덱스가 어느 파티션에서 사용이 되는지 확인해서 각 파티션별로 인덱스를 rebuild하면 될것 같은데??
우선 이 인덱스가 어느 파티션에서 사용되는지 확인해보자.
SQL> select index_name, partition_name from dba_ind_partitions where index_name='인덱스명';
INDEX_NAME PARTITION_NAME
------------------------------ ------------------------------
EE ARCH_STATE
EE CURR_STATE
EE PREV_STATE
그리고 각 파티션에 대해서 인덱스를 rebuild하자.
SQL> alter index ee rebuild partition ARCH_STATE;
Index altered.
SQL> alter index ee rebuild partition CURR_STATE;
Index altered.
SQL> alter index ee rebuild partition PREV_STATE;
Index altered.
게임 오바~!!
alter index ee rebuild partition ARCH_STATE;
[오라클/oracle] 특정 테이블의 속성 조회하기 (0) | 2015.04.20 |
---|---|
[오라클/oracle] 테이블 스페이스 사용량 확인하기 (0) | 2015.04.20 |
[오라클/oracle] ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired (0) | 2015.04.20 |
[오라클/oracle] ORA-32773: operation not supported for smallfile tablespace (0) | 2015.04.20 |
[오라클/oracle] ORA-00845: MEMORY_TARGET not supported on this system (0) | 2015.04.20 |