Oracle DBA Queries - Database status, uptime, how big is it, etc...
-- -- Displays Space Usage for Each Datafile and whether it can be Resized -- SET PAUSE ON SET PAUSE 'Press Return to Continue' SET PAGESIZE 60 SET LINESIZE 300 COLUMN file_name FORMAT A80 SELECT file_name, hwm, blocks total_blocks, blocks-hwm+1 as Shrinkage_Available FROM dba_data_files a, ( select file_id, max(block_id+blocks) hwm from dba_extents group by file_id ) b WHERE a.file_id = b.file_id /