select f.tablespace_name,sum(f.bytes_free + f.bytes_used)/1024/1024/1024 "total
GB",sum((f.bytes_free + f.bytes_used) - nvl(p.bytes_used, 0))/1024/1024/1024 "Free
GB",sum(nvl(p.bytes_used, 0))/1024/1024/1024 "Used GB"
from
v_$temp_space_header f, dba_temp_files d, v_$temp_extent_pool p
where f.tablespace_name(+) = d.tablespace_name and f.file_id(+) = d.file_id and
p.file_id(+) = d.file_id
group by f.tablespace_name;
GB",sum((f.bytes_free + f.bytes_used) - nvl(p.bytes_used, 0))/1024/1024/1024 "Free
GB",sum(nvl(p.bytes_used, 0))/1024/1024/1024 "Used GB"
from
v_$temp_space_header f, dba_temp_files d, v_$temp_extent_pool p
where f.tablespace_name(+) = d.tablespace_name and f.file_id(+) = d.file_id and
p.file_id(+) = d.file_id
group by f.tablespace_name;