select '/* ' ||OWNER || '.' || SEGMENT_NAME || ' Tamaño Data:' ||
round(BYTES/1024/1024) || ' */'
from dba_segments
where owner= 'SIEBEL'
and SEGMENT_NAME in (upper(:1))
union all
select 'alter table ' || owner || '.' || table_name || ' move
tablespace ' || 'xdb_paso;'
from dba_tables
where table_name in (upper(:1))
and owner= 'SIEBEL'
union all
select 'alter table ' || owner || '.' || table_name || ' move
tablespace ' || 'xdb;'
from dba_tables
where table_name in (upper(:1))
and owner= 'SIEBEL'
union all
select 'alter index ' || owner || '.' || index_name || ' rebuild
TABLESPACE ' || tablespace_name || ';'
from dba_indexes
where owner= 'SIEBEL'
and table_name in (upper(:1))
and index_type <> 'LOB'
;