Rollback Segments - Alter all offline rollback segments to online, except the system rollback
set echo off
--
--  a_online_rollback_segs.sql    
--
--  Alter all offline rollback segments to online, except the system rollback.  
--
--  Usage: @scripts/a_online_rollback_segs
--
set termout off
set verify off
set doc off
set feedback off
set recsep off
set pagesize 0
--
define lsize=200
set linesize &&lsize
--
define out_file=a_online_rollback_segs.ddl
spool &&out_file
--
select 'alter rollback segment '||segment_name||' online;' 
from dba_rollback_segs 
where segment_name not in ('SYSTEM')
and status = 'OFFLINE';
spool off
set doc off
set feedback on
set pagesize 30
set termout on
set echo on
--start &&out_file
-- exit