DBA가 되고 싶은 병아리
테이블 용량 조사하는 쿼리 예시 본문
select
ts.status
, data.name
, ts.contents
, extent_management
, data.Mbytes "SPACE(MB)", free.free "FREE(MB)"
, trunc((data.Mbytes-free.free)/data.Mbytes*100,2) "Used(%)"
from (select tablespace_name name, trunc(sum(bytes/1024/1024)) Mbytes
from dba_data_files
group by tablespace_name) data,
(select free.tablespace_name, trunc(sum(free.bytes)/1024/1024,1) free
from dba_free_space free
group by free.tablespace_name) free,
dba_tablespaces ts
where data.name = free.tablespace_name
and data.name = ts.tablespace_name
;
'Oracle Study > Admin I' 카테고리의 다른 글
관리 시 유용한 기본 파라메터 (0) | 2012.03.29 |
---|---|
SQL Dictionary의 정리 (0) | 2012.03.29 |
대기 이벤트인 10046 진단이벤트 (0) | 2012.02.03 |
IOT(INDEX ORGANIZED TABLE) 란? (0) | 2011.09.05 |
exp 백업 날짜 붙여서 (0) | 2011.08.04 |