-- Для работы скрипта требуется доступ к представлению V$DATAFILE, DBA_DATA_FILES,
-- DBA_FREE_SPACE
SELECT round((sum(bytes)/1048576/1024),2) "Total(GB)" FROM V$DATAFILE;
Размер и свободное место в базе данных
SELECT
"RESERVED_SPACE(MB)", "RESERVED_SPACE(MB)" - "FREE_SPACE(MB)" "USED_SPACE(MB)","FREE_SPACE(MB)"
FROM(
SELECT
(SELECT SUM(BYTES/(1014*1024)) FROM DBA_DATA_FILES) "RESERVED_SPACE(MB)",
(SELECT SUM(BYTES/(1024*1024)) FROM DBA_FREE_SPACE) "FREE_SPACE(MB)"
FROM DUAL);