오라클 테이블 스페이스 확인(Oracle TableSpace)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
SELECT A.TABLESPACE_NAME, A.FILE_ID, ROUND(A.BYTES/1024/1024/1024, 2)||'G' USABLE, ROUND( B.BYTES/1024/1024/1024,2)||'G' FREE, trunc(100-(B.BYTES/A.BYTES*100),2)||'%' USED_RATE, trunc(B.BYTES/A.BYTES*100,2)||'%' FREE_RATE FROM ( SELECT TABLESPACE_NAME, FILE_ID, SUM(BYTES) BYTES FROM DBA_DATA_FILES GROUP BY TABLESPACE_NAME, FILE_ID ) A, ( SELECT TABLESPACE_NAME, FILE_ID, SUM(BYTES) BYTES FROM DBA_FREE_SPACE GROUP BY TABLESPACE_NAME, FILE_ID ) B WHERE A.TABLESPACE_NAME = B.TABLESPACE_NAME AND A.FILE_ID = B.FILE_ID(+) ORDER BY 1; |