sql script that i use to move out:

accept TABLESPACE prompt "Enter tablespace name "

spool move_out.sql
select
'alter table '
||owner
||'.'
||table_name
|| chr(10)
||'move nologging tablespace LMT_MIG_TMP;'
from dba_tables
where tablespace_name=upper('&TABLESPACE')
/
select 'alter table '
||l.owner||'.'
||l.table_name
|| chr(10)
||' move lob ('
||l.column_name
||') '
|| chr(10)
||'store as '
||l.segment_name
||' (tablespace LMT_MIG_TMP);'
from dba_lobs l, dba_segments s
where s.owner = l.owner
and s.segment_name = l.segment_name
and s.tablespace_name=upper('&TABLESPACE')
/

select
'alter index '
||owner
||'.'
||index_name
|| chr(10)
||'rebuild nologging tablespace LMT_MIG_TMP;'
from dba_indexes
where tablespace_name=upper('&TABLESPACE')
/

spool off
sql script that i use to move back:

accept TABLESPACE prompt "Enter tablespace name "

spool move_back.sql
select
'alter table '
||owner
||'.'
||table_name
|| chr(10)
||'move nologging tablespace &TABLESPACE;'
from dba_tables
where tablespace_name='LMT_MIG_TMP'
/
select 'alter table '
||l.owner||'.'
||l.table_name
|| chr(10)
||' move lob ('
||l.column_name
||') '
|| chr(10)
||'store as '
||l.segment_name
||' (tablespace &TABLESPACE);'
from dba_lobs l, dba_segments s
where s.owner = l.owner
and s.segment_name = l.segment_name
and tablespace_name='LMT_MIG_TMP'
/

select
'alter index '
||owner
||'.'
||index_name
|| chr(10)
||'rebuild nologging tablespace &TABLESPACE;'
from dba_indexes
where tablespace_name='LMT_MIG_TMP'
/

select
'alter table '
||owner
||'.'
||table_name
|| chr(10)
||'logging ;'
from dba_tables
where tablespace_name='LMT_MIG_TMP'
/

select
'alter index '
||owner
||'.'
||index_name
|| chr(10)
||'logging ;'
from dba_indexes
where tablespace_name='LMT_MIG_TMP'
/
spool off