Guest User

Untitled

a guest
Jan 17th, 2018
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. select substr(TABLESPACE_NAME, 1, 40) tablespace,
  2. case
  3. when used_percent >= 95 then
  4. 'Critico'
  5. when used_percent >= 75 then
  6. 'Atenção'
  7. else
  8. 'Normal'
  9. end alerta,
  10. -- % used
  11. round(used_percent, 2) used_percent,
  12. tablespace_size tablespace_blocks,
  13. --used_space
  14. round((used_space * 8192) / (1024 * 1024), 2) used_mb,
  15. round(((used_space * 8192) / (1024 * 1024) / 1024), 2) used_gb,
  16. --TABLESPACE_SIZE
  17. round((tablespace_size * 8192) / (1024 * 1024), 2) tablespace_ext_mb,
  18. round(((tablespace_size * 8192) / (1024 * 1024) / 1024), 2) tablespace_ext_gb,
  19. round((((tablespace_size * 8192) / (1024 * 1024) / 1024) -
  20. ((used_space * 8192) / (1024 * 1024) / 1024)),
  21. 2) restante_gb
  22. from dba_tablespace_usage_metrics x
  23. order by used_percent desc;
Add Comment
Please, Sign In to add comment