select 'alter table ' || do.owner || '.' || do.object_name ||
       ' SET STORE IN (DMSPACE);' as cmd_to_invoke 
from dba_objects do, dba_segments ds, dba_tables dt
where do.owner=ds.owner and do.owner=dt.owner
  and do.object_name = ds.segment_name and do.object_name=dt.table_name
  and dt.iot_name is null and do.object_type='TABLE'
  and ds.tablespace_name = 'DMSPACE';

select owner, table_name, def_tablespace_name
from dba_part_tables
where lower(def_tablespace_name) like '%deleted%'


select owner, INDEX_NAME, table_name, def_tablespace_name
 from dba_part_indexes
 where lower(def_tablespace_name) like '%deleted%';