Recent system space is not enough, to do database cleanup, truncate data, found that the data is not continuous, resulting in this table space occupies a huge, think of using shrink, move. But shrink efficiency is slow, choose move. The statement probably does this:
SELECT 'ALTER TABLE SDMP.' ||C.table_name|| 'Move Partition' ||C.partition_name|| 'tablespace sdmp_s update indexes;' fromall_tab_statistics CINNER JOINall_tab_partitions S onS.partition_name=C.partition_name andS.tablespace_name='sdmp_s_201502' WHEREC.owner= 'sdmp' andC.object_type<> 'INDEX';
Find that some indexes are not moving (mostly partitioned): Use Select to find the corresponding statement and move
SELECT 'alter index SDMP.' ||A.segment_name||'Rebuild Partition'||A.partition_name||'tablespace sdmp_s;' fromdba_segments A Left JOINdba_indexes B onA.segment_name=B.index_nameWHEREA.tablespace_name= 'sdmp_s_201302';
Delete Table space
Drop and Datafiles;
Oracle indexes are moved to different partitions