Mover tabelas e índices para outra tablespace
Índices
select ‘alter index ‘|| owner ||’.’||segment_name||’ rebuild tablespace USERS;’
from dba_segments
where 0=0
and owner = ‘xxxx’
and tablespace_name<>’USERS’
and segment_type=’INDEX’;
Tabelas
select ‘alter table ‘||owner ||’.’||segment_name||’ move tablespace USERS;’
from dba_segments
where owner=’xxxxx’
and tablespace_name<>’USERS’
and segment_type=’TABLE’;