En este script utilizo la vista dba_temp_free_space que está disponible a partir de la versión 11g de Oracle: SELECT a . tablespace_name , a . asignado , b . libre , c . contents , c . status FROM ( SELECT tablespace_name , SUM ( bytes )/ 1024 / 1024 AS asignado FROM dba_Data_files GROUP BY tablespace_name ) a , ( SELECT tablespace_name , SUM ( bytes )/ 1024 / 1024 AS libre FROM dba_free_space GROUP BY tablespace_name ) b , ( SELECT tablespace_name , contents , status FROM dba_tablespaces ) c WHERE a . tablespace_name = b . tablespace_name (+) AND a . tablespace_name = c . tablespace_name UNION ALL SELECT d . TABLESPACE_NAME , d . ALLOCATED_SPACE / 1024 / 1024 , d . FREE_SPACE / 1024 / 1024 , e . contents , e . status FROM dba_temp_free_space d , dba_tablespaces e WHERE d . tablespace_name = e . tablespace_name AND contents = 'TEMPORARY' ; Para la versión
Comentarios