Oracle
오라클 테이블스페이스 용량 확인 tablespace size
꼬요버디
2024. 5. 23. 10:26
728x90
오라클 테이블스페이스 용량 확인하기
select substr(a.tablespace_name,1,30) tablespace,
round(sum(a.total1)/1024/1024/1024,2) TotalGB,
round(sum(a.total1)/1024/1024/1024,2)-round(sum(a.sum1)/1024/1024/1024,2) UsedGB,
round(sum(a.sum1)/1024/1024/1024,2) FreeGB,
round((round(sum(a.total1)/1024/1024/1024,2)-round(sum(a.sum1)/1024/1024/1024,2))/round(sum(a.total1)/1024/1024/1024,2)*100,2) Used
from
(select tablespace_name,0 total1,sum(bytes) sum1,max(bytes) MAXB,count(bytes) cnt
from dba_free_space
group by tablespace_name
union
select tablespace_name,sum(bytes) total1,0,0,0
from dba_data_files
group by tablespace_name) a
group by a.tablespace_name
order by tablespace;