freecount.sql

-- 
-- Title :       freecount.sql 
-- Description : Show the number of free 
--               extents by tablespace. 
-- 
-- Usage/Notes : Coalesce tablespace if number 
--               of extents is excessive
--               and NOT locally managed.
-- 
-- Copyright :   ABCdba.com 2002 
-- 
 
SET TERMOUT OFF 
STORE SET save_env.sql REPLACE 
SET TERMOUT ON 
 
COL freecount HEA "Extents" FOR 999999 
COL tablespace_name HEA " Tablespace " FOR a20 
 
SELECT 
tablespace_name, count(*) freecount 
FROM 
dba_free_space 
GROUP BY 
tablespace_name 
ORDER BY 
tablespace_name 
/ 
 
@save_env.sql 
host rm save_env.sql 
SET TERMOUT ON

© copyright 2001-2014 ABCdba.com | all rights reserved