oracle默认账号及密码Change tablespace for INDEX

Change tablespace for INDEX

 

1. Normal case

ALTER INDEX index_name rebuild TABLESPACE tablespace_name;

   www.2cto.com  

2. Index with partition

If TABLESPACE_NAME is null, which means the index has been partitioned.

 

SELECT TABLESPACE_NAME, a.* FROM user_indexes a;

 

if run below directly:

ALTER Ioracle账号NDEX index_name rebuild TABLESPACE tablespace_name;

 

you will get error:

ORA-14086: a partitioned index may not be rebuilt as a whole

 

The solution is:

ALTER INDEX index_name rebuild PARTITION partition_name TABLESPACE tablespace_name;

此条目发表在oracle metalink账号分类目录,贴了标签。将固定链接加入收藏夹。