데이터베이스
[ORACLE] tablespace 실 사용량 가져오는 쿼리
미랭군
2012. 3. 7. 17:26
SELECT u.tablespace_name "tablespace_name",
u.file_name,
u.bytes / 1024000 "Size(MB)",
trunc( (u.bytes - sum(nvl(f.bytes,0))) / u.bytes * 100, 2) "Used(%)"
FROM DBA_FREE_SPACE f, DBA_DATA_FILES u
WHERE f.file_id(+) = u.file_id
GROUP BY u.tablespace_name, u.file_name, u.bytes
ORDER BY u.tablespace_name;