set echo off
set heading off
set feedback off

prompt ---------------------------------
prompt - Mise en ligne des tablespaces -
prompt ---------------------------------

set term off
spool tbs_en_ligne.tmp

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

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

spool off
set term on

@tbs_en_ligne.tmp
