1. Partition 조회
SELECT PARTITION_NAME, Count(1)
FROM USER_TAB_PARTITIONS
WHERE TABLE_OWNER = 'PRD_SOAINFRA'
AND PARTITION_NAME BETWEEN 'PT_20140829' and 'PT_20140904'
GROUP BY PARTITION_NAME
ORDER BY PARTITION_NAME;
2. Tablespace 사용률 확인
SELECT TABLESPACE_NAME, SUM(BYTES/1024/1024) SIZE_GB
FROM DBA_SEGMENTS
WHERE TABLESPACE_NAME='PRD_SOAINFRA'
GROUP BY TABLESPACE_NAME;
3. Partition 추가
alter table PRD_SOAINFRA.DOCUMENT_CI_REF add partition PT_20140902 values less than(TIMESTAMP '2014-09-03 00:00:00') tablespace PRD_SOAINFRA;
4. Partition Table 조회
SELECT table_name, count(1)
from user_tab_partitions
where 1=1
group by table_name;
'Database' 카테고리의 다른 글
Oracle Function(산술, 문자열, 날짜, 날짜 포맷) (0) | 2014.09.13 |
---|---|
GRANT, REVOKE (0) | 2014.09.11 |
Database Listener, Instance (0) | 2014.08.29 |
DB instance 확인 (0) | 2014.08.19 |
TABLESPACE USAGE (0) | 2014.08.14 |