티스토리 뷰

Skill/DB

oracle tablespace 조회

진열사랑 2020. 9. 23. 12:34

select distinct d.file_id file#,
     d.tablespace_name  ts_name,
     d.bytes/1024/1024  MB,
     d.bytes / 8192             total_blocks,
     sum(e.blocks)              used_blocks,
     to_char(nvl(round(sum(e.blocks)/(d.bytes/8192),4),0)*100,'09.99') || ' %' pct_used
     from dba_extents e, dba_data_files d
     where d.file_id  = e.file_id(+)
     group by d.file_id, d.tablespace_name, d.bytes
     order by 1, 2;

 

 

 

댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/11   »
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
글 보관함