[Oracle] Table Space 사용량 확인 쿼리
SELECT A.TABLESPACE_NAME , ROUND(SUM(A.BYTES) / (1024 * 1024)) "전체(MB)" , ROUND(SUM(B.FREES) / (1024 * 1024)) "여유(MB)" , ROUND(SUM(B.FREES) * 100 / SUM(A.BYTES), 2) AS "잔여공간비율(%)" FROM ( SELECT FILE_ID , TABLESPACE_NAME , SUM(BYTES) BYTES FROM DBA_DATA_FILES GROUP BY FILE_ID, TABLESPACE_NAME) A , ( SELECT TABLESPACE_NAME , FILE_ID , SUM(BYTES) FREES FROM DBA_FREE_SPACE GROUP BY TABLESPACE_NAME, ..
2021. 2. 24.