Several SQL statements about oracle space usage query 1. View Tablespace usage col Tablespace format a24col "% Used" for 99.99 select df. tablespace_name "Tablespace", df. bytes/(1024*1024) "Total Size (MB)", sum (fs. bytes)/(1024*1024) "Free Size (MB)", round (sum (fs. bytes) * 100/df. bytes) "% Free", round (df. bytes-sum (fs. bytes) * 100/df. bytes, 2) "% Used" from dba_free_space fs, (select tablespace_name, sum (bytes) bytes from dba_data_files group by tablespace_name) df where fs. tablespace_name = df. tablespace_namegroup by df. tablespace_name, df. bytes; 2. Total Size of all tablespaces select sum (bytes)/(1024*1024*1024) "Total Size (GB)" from dba_data_files; 3. select sum (bytes)/(1024*1024*1024) "Total Size (GB)" from dba_free_space; 4. Total Business tablespace size (Business tablespace here refers to a tablespace larger than 20 GB) select sum (df. bytes)/(1024*1024*1024) total from (select tablespace_name, sum (bytes) bytes from dba_data_files group by tablespace_name) df where (df. bytes/(1024*1024*1024)> 20; 5. select sum (fs. bytes) total from (select tablespace_name, sum (bytes)/(1024*1024*1024) bytes from dba_free_space group by tablespace_name) fs where fs. tablespace_name in (select tablespace_name from (select tablespace_name, sum (bytes) bytes from dba_data_files group by tablespace_name) df where (df. bytes/(1024*1024*1024)> 20 );