set echo off
set heading off
set feedback off

prompt -----------------------------------
prompt - Mise hors ligne des tablespaces -
prompt -----------------------------------

set term off
spool tbs_hors_ligne.tmp

SELECT 'set echo on' FROM dual;
SELECT 'set feedback on' FROM dual;

SELECT 
   'alter tablespace '||tablespace_name||' offline;'
FROM 
   dba_tablespaces
WHERE 
   tablespace_name not in ('SYSTEM','OUTLN')
AND 
   status = 'ONLINE';

spool off
set term on

@tbs_hors_ligne.tmp
