Analisando o tamanho e espaço da tablespace Oracle
Analisando o tamanho e espaço da tablespace no Oracle.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
SELECT t.tablespace ,t.totalspace AS " Totalspace(MB)" ,round((t.totalspace - fs.freespace), 2) AS "Used Space(MB)" ,fs.freespace AS "Freespace(MB)" ,round(((t.totalspace - fs.freespace) / t.totalspace) * 100, 2) AS "% Used" ,round((fs.freespace / t.totalspace) * 100, 2) AS "% Free" FROM (SELECT round(SUM(d.bytes) / (1024 * 1024)) AS totalspace ,d.tablespace_name tablespace FROM dba_data_files d GROUP BY d.tablespace_name) t ,(SELECT round(SUM(f.bytes) / (1024 * 1024)) AS freespace ,f.tablespace_name tablespace FROM dba_free_space f GROUP BY f.tablespace_name) fs WHERE t.tablespace = fs.tablespace ORDER BY t.tablespace; |