일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- 안드로이드
- 운정
- MSSQL
- librecad
- Android
- 라즈베리파이
- oracle
- 시작하기
- 오라클
- 잡토이 메이킹 코딩 학원
- tomcat
- 잡토이
- 리브레캐드
- jobtoy
- 톰캣
- 설치
- 스크래치
- 강좌
- mysql
- 유니티
- jsp
- html5
- 아두이노
- 예제
- Unity
- 설정
- 코딩
- Spring Security
- 파주
- s4a
- Today
- Total
랩제이
TABLESPACE 정보 조회 본문
- 모든 TABLESPACE 정보 조회
SELECT tablespace_name, initial_extent, next_extent, min_extents,
max_extents, pct_increase, status, contents
FROM dba_tablespaces

- TABLESPACE를 구성하고 있는 Data File 정보 조회
SELECT tablespace_name, file_name, file_id, bytes, blocks, status, autoextensible
FROM dba_data_files

- TABLESPACE 총 크기, 사용량, 남은 공간 조회
SELECT a.tablespace_name, ROUND(SUM(a.total)/1024/1024, 2) "Total(M)",
ROUND((SUM(a.total)-SUM(NVL(b.free, 0)))/1024/1024,2) "Used(M)",
ROUND((SUM(a.total)-SUM(NVL(b.free, 0)))/SUM(a.total)*100, 2) "Used(%)"
FROM (SELECT d.tablespace_name, d.file_id, SUM(d.bytes) total FROM dba_data_files d
GROUP BY d.tablespace_name, d.file_id) a,
(SELECT f.file_id, SUM(f.bytes) free FROM dba_free_space f
GROUP BY f.file_id) b
WHERE a.file_id = b.file_id(+)
GROUP BY a.tablespace_name;

- TABLESPACE의 수집 가능한 Extent에 대한 통계 정보 조회
SELECT tablespace_name, total_extents, extents_coalesced, percent_extents_coalesced
FROM dba_free_space_coalesced;

- TABLESPACE 공간 수집
ALTER TABLESPACE tablespace COALESCE;
'database > oracle' 카테고리의 다른 글
100만건 이상(대량)의 데이터에서 중복키를 확인하도록 하는 방법 (0) | 2012.03.21 |
---|---|
제약조건 (0) | 2012.03.21 |
TABLESAPCE 이해2 (0) | 2012.03.21 |
TABLESPACE 이해 (0) | 2012.03.21 |
Sub Query (0) | 2012.03.21 |