Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select substr(TABLESPACE_NAME, 1, 40) tablespace,
- case
- when used_percent >= 95 then
- 'Critico'
- when used_percent >= 75 then
- 'Atenção'
- else
- 'Normal'
- end alerta,
- -- % used
- round(used_percent, 2) used_percent,
- tablespace_size tablespace_blocks,
- --used_space
- round((used_space * 8192) / (1024 * 1024), 2) used_mb,
- round(((used_space * 8192) / (1024 * 1024) / 1024), 2) used_gb,
- --TABLESPACE_SIZE
- round((tablespace_size * 8192) / (1024 * 1024), 2) tablespace_ext_mb,
- round(((tablespace_size * 8192) / (1024 * 1024) / 1024), 2) tablespace_ext_gb,
- round((((tablespace_size * 8192) / (1024 * 1024) / 1024) -
- ((used_space * 8192) / (1024 * 1024) / 1024)),
- 2) restante_gb
- from dba_tablespace_usage_metrics x
- order by used_percent desc;
Add Comment
Please, Sign In to add comment