select substr(a.tablespace_name,1,30) tablespace,
round(sum(a.total1)/1024/1024,1) "TotalMB",
round(sum(a.total1)/1024/1024,1)-round(sum(a.sum1)/1024/1024,1) "UsedMB",
round(sum(a.sum1)/1024/1024,1) "FreeMB",
round((round(sum(a.total1)/1024/1024,1)-round(sum(a.sum1)/1024/1024,1))/round(sum(a.total1)/1024/1024,1)*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;
'직장생활 > DataBase' 카테고리의 다른 글
[Oracle] 오라클 SELECT 해서 INSERT 하는 방법 (여러개, 서브쿼리) (0) | 2023.05.16 |
---|---|
[SQL] 테이블 스페이스 용량 늘리기 (0) | 2023.02.15 |
[SQL] 테이블 스페이스란 (2) | 2023.02.15 |
Oracle SHA256 사용하기 (0) | 2021.07.20 |
오라클 MERGE INTO - 한번에 INSERT, UPDATE (0) | 2019.05.08 |
댓글