使用命令得到移动表空间的语句
select 'alter table '||table_name||' move tablespace aaa;' from all_tables where tablespace_name= 'user' and owner= 'aaa';
然后执行生成的语句即可
当然,一般还需要在新的表空间中重建索引
select 'alter index '||index_name ||' rebuild tablespace aaa_index;' from dba_indexs where tablespace_name= 'user' and owner= 'aaa';
然后执行生成的语句即可