Advertisement
Guest User

Untitled

a guest
Nov 7th, 2018
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. {code}
  2. select * from (select occ.tablespace_name, occupied, free, occupied+free as total, round(occupied/(occupied+free)*100) as perc_occupied from
  3. (select * from (select tablespace_name, trunc(sum(bytes/1024/1024),1) as occupied from user_extents group by tablespace_name)as t) as occ,
  4. (select * from (select tablespace_name, trunc(sum(bytes/1024/1024),1) as free from user_free_space group by tablespace_name)as t1) as free
  5. where occ.tablespace_name = free.tablespace_name) as f where perc_occupied > 99
  6. {code}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement