테이블스페이스 사용현황 확인하는 스크립트
2010.05.12 08:26
원문 : http://www.ischo.net -- 조인상 // 시스템 엔지니어
Writer : http://www.ischo.net -- ischo // System Engineer in Replubic Of Korea
+++++++++++++++++++++++++++++++++++++++++++++++++++++++
본문 : http://www.ischo.net -- 조인상 //시스템 엔지니어
+++++++++++++++++++++++++++++++++++++++++++++++++++++++
COL FILE_NAME FORMAT A40
COL TABLESPACE_NAME FORMAT A30
SET LINESIZE 150
SELECT b.file_name "FILE_NAME",
b.tablespace_name "TABLESPACE_NAME",
b.bytes / 1024 "TOTAL SIZE(KB)",
((b.bytes - sum(nvl(a.bytes,0)))) / 1024 "USED(KB)",
(sum(nvl(a.bytes,0))) / 1024 "FREE SIZE(KB)",
(sum(nvl(a.bytes,0)) / (b.bytes)) * 100 "FREE %"
FROM DBA_FREE_SPACE a, DBA_DATA_FILES b
WHERE a.file_id(+) = b.file_id
GROUP BY b.tablespace_name, b.file_name, b.bytes
ORDER BY b.tablespace_name;
+++++++++++++++++++++++++++++++++++++++++++++++++++++++
COL FILE_NAME FORMAT A40
COL TABLESPACE_NAME FORMAT A30
SET LINESIZE 150
SELECT b.file_name "FILE_NAME",
b.tablespace_name "TABLESPACE_NAME",
b.bytes / 1024 "TOTAL SIZE(KB)",
((b.bytes - sum(nvl(a.bytes,0)))) / 1024 "USED(KB)",
(sum(nvl(a.bytes,0))) / 1024 "FREE SIZE(KB)",
(sum(nvl(a.bytes,0)) / (b.bytes)) * 100 "FREE %"
FROM DBA_FREE_SPACE a, DBA_DATA_FILES b
WHERE a.file_id(+) = b.file_id
GROUP BY b.tablespace_name, b.file_name, b.bytes
ORDER BY b.tablespace_name;