블로그 이미지
redkite

카테고리

분류 전체보기 (291)
00.SI프로젝트 산출물 (0)
00.센터 운영 문서 (0)
01.DBMS ============.. (0)
01.오라클 (117)
01.MS-SQL (15)
01.MySQL (30)
01.PostgreSql (0)
01.DB튜닝 (28)
====================.. (0)
02.SERVER ==========.. (0)
02.서버-공통 (11)
02.서버-Linux (58)
02.서버-Unix (12)
02.서버-Windows (2)
====================.. (0)
03.APPLICATION =====.. (11)
====================.. (0)
04.ETC =============.. (0)
04.보안 (5)
====================.. (0)
05.개인자료 (1)
06.캠핑관련 (0)
07.OA관련 (1)
Total
Today
Yesterday

달력

« » 2024.5
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

공지사항

최근에 올라온 글

0010. 파티션 테이블 생성

http://docs.oracle.com/cd/B19306_01/server.102/b14231/partiti.htm

1. ADD

ex)

ALTER TABLE LG_CV ADD PARTITION PT_0709 VALUES less than ('0710') TABLESPACE ADWS_00_LG;

2. SPLIT ()

ADD 방법 으로 했는데 "ORA-14074: partition bound must collate higher than that of the last partition" 에러가 날 경우

ex)

alter table LG_TS_URL split partition PT_0710 at('0710')
into (partition PT_0709,partition PT_0710) ;

= SPLIT 설명 =

ALTER TABLE &Table_Name
SPLIT PARTITION &분할대상Partition_Name AT ('&SplitValue')
INTO (
PARTITION &하위Partition_Name TABLESPACE &하위파티션TableSpace_Name,
PARTITION &상위Partition_Name TABLESPACE &상위파티션TableSpace_Name
);

- &Table_Name : 변경할 테이블 명
- &분할대상Partition_Name : Partition Key가 'MAXVALUE'인 현재 최상위 Partition 이름
- &SplitValue : 분할 기준이 되는 값
- &하위Partition_Name : 분할될 영역 중 하위 Partition 명 즉, 최상위 Partition 이름
- &하위파티션TableSpace_Name : 분할될 영역 중 하위 Partition이 사용할 TableSpace명
- &상위Partition_Name : 분할될 영역 중 상위 Partition 명 즉, 신규 Partition 이름
- &상위파티션TableSpace_Name : 분할될 영역 중 상위 Partition이 사용할 TableSpace명
※ Partition Split 구문은 해당 Table의 Local Index를 자동으로 생성하나 Local Index의
Partition 명 및 Tablespace도 Table 분할시 지정하였던 이름으로 지정 및 생성되지여.
고로, Rename 및 Tablespace를 변경 해야함다..
※ Partition Split 구문은 사용시 해당 Table의 Global Index(PK)는 사용불가 상태가 되며
Rebuild 작업을 해야함다.

작업이 끝나면 정상적으로 분할되었나 확인하시면 되여..
SELECT *
FROM USER_TAB_PARTITIONS
WHERE TABLE_NAME = 'TABLE명'

Posted by redkite
, |

최근에 달린 댓글

최근에 받은 트랙백

글 보관함