How to check space used and free on temporal tablespace.
set linesize 300
select t2."TempTotal" "TempTotal (Mb)",t1."TempUsed" "TempUsed (GB)",t2."TempTotal" - t1."TempUsed" "TempFree (GB)"
from (select nvl(round(sum(tu.blocks * tf.block_size) / 1024 / 1024 /1024, 2), 0) "TempUsed"
from v$tempseg_usage tu, dba_tablespaces tf
where tu.TABLESPACE = tf.tablespace_name) t1,
(select round(sum(bytes) / 1024 / 1024 /1024, 2) "TempTotal"
from dba_temp_files) t2;
Comments