Oracle DBA Queries - Database status, uptime, how big is it, etc...
-- -- Tablespace Usage -- CLEAR BREAKS CLEAR COLUMNS CLEAR COMPUTES SET VERIFY OFF COL tablespace_name HEA 'Tablespace Name' FOR a20 COL ambytecount HEA 'Available' FOR 99999999999.999 COL umbytecount HEA ' Used ' FOR 99999999999.999 SELECT ddf.tablespace_name, SUM( distinct ddf.ddfbytes )/1048576 ambytecount, SUM( NVL( ds.bytes , 0 ) / 1048576 ) umbytecount FROM ( SELECT tablespace_name, SUM( bytes ) ddfbytes FROM dba_data_files GROUP BY tablespace_name ) ddf, dba_segments ds WHERE ddf.tablespace_name = ds.tablespace_name (+) GROUP BY ddf.tablespace_name /