
set linesize 80;
set pagesize 1000;
set long 50;
set echo on;

/* ****************************************************** */
/*                                                        */
/* Will build a script to coalesce all tablespaces        */
/*                                                        */
/*         @c:\my_own\oracle\sql\all_coal.sql             */ 
/*                                                        */
/* ****************************************************** */

/* ******************************* */
/* show the size of the tablespace */
/* ******************************* */

set echo off;

select 'ALTER TABLESPACE '||tablespace_name||' COALESCE;'
from sys.dba_tablespaces
order by tablespace_name;

spool coalesce.sql 
/
spool off

@coalesce


commit;









