1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32 |
-- 테이블 용량 확인 select sum (bytes)/1024/1024 MB from dba_segments where owner= 'SCOTT' and segment_name= 'TEST01' -- 테이블별 인덱스 확인 select index_owner, table_name, column_name, index_name from dba_ind_columns where table_name= 'TEST02' order by table_name -- 사용자별 사용량 확인 select segment_name, sum (bytes)/1024/1024 mb from dba_segments group by segment_name order by mb asc ; -- 테이블스페이스별 사용량 확인 select a.tablespace_name, a.file_name, a.bytes/1024/1024 "전체" ,
b. "free byte" /1024/1024 "남음" ,
(a.bytes - b. "free byte" )/1024/1024 "사용중" from dba_data_files a,
( select tablespace_name, sum (bytes) "free byte"
from dba_free_space
group by tablespace_name
) b where a.tablespace_name = b.tablespace_name; -- SALESTBS라는 테이블스페이스 대한 모든 소유자들과 사용량 등 확인 SELECT OWNER, SEGMENT_NAME, SEGMENT_TYPE, BYTES, BLOCKS FROM DBA_SEGMENTS WHERE TABLESPACE_NAME = 'SALESTBS' |
DB/Oracle Administrator
유용한 쿼리 모음
soccerda
2012. 7. 6. 01:20
반응형
반응형