1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| SELECT nvl(b.tablespace_name,
nvl(a.tablespace_name,'UNKNOWN')) "Tablespace",
kbytes_alloc "Alloué (Mo)",
decode(Allouable, 0, kbytes_alloc, allouable) "Allouable (Mo)",
kbytes_alloc-nvl(kbytes_free,0) "Utilisé réel (Mo)",
nvl(kbytes_free,0) "Libre réel (Mo)",
trunc((kbytes_alloc-nvl(kbytes_free,0))/kbytes_alloc, 4)*100 "Utilisé réel (%)",
decode(Allouable, 0, kbytes_alloc, allouable)-(kbytes_alloc-nvl(kbytes_free,0)) "Libre virtuel (Mo)",
trunc((kbytes_alloc-nvl(kbytes_free,0))/decode(Allouable, 0, kbytes_alloc, allouable), 4)*100 "Utilisé virtuel (%)",
data_files "Fichiers"
FROM ( SELECT sum(bytes)/1024/1024 Kbytes_free,
max(bytes)/1024/1024 largest,
tablespace_name
FROM sys.dba_free_space
GROUP BY tablespace_name ) a,
( SELECT sum(bytes)/1024/1024 Kbytes_alloc,
sum(maxbytes)/1024/1024 Allouable,
tablespace_name,
count(*) data_files
FROM sys.dba_data_files
GROUP BY tablespace_name )b
WHERE a.tablespace_name (+) = b.tablespace_name
ORDER BY 1; |
Partager