반응형


오라클에서 


EXP -> IMP 하는 방식에는


exp 테이블 스키마 추출

exp id/passwd file=./temp.dmp log=./log.log compress=n rows=n


 imp id/passwd indexfile=create.sql full=y 옵션을 주어


입력하지는 않고 create.sql을 만들어


스크립트 형태로 수동으로 돌릴 수 있다.


다만,


그냥 import 했을 때는


커져버린 초기값을 만나게 되는데...


이것을 수정하는 방법은


initial, next 값 수정!


- 테이블 스페이스 생성시 local로 생성해야만 함 ~

확인 쿼리

SELECT initial_extent, next_extent, pct_increase,

            extent_management, allocation_type

     FROM DBA_TABLESPACES

     WHERE tablespace_name=upper('테이블스페이스명');


- initial 값 수정


1. 분석하기 (emp1 테이블 분석)


analyze table emp1 compute statistics;


2. 분석을 기준으로 사용하지 않는 불럭 초기화

alter table emp1 deallocate unused keep 0;


3. 블럭 사이즈  확인 하는 법

select table_name, initial_extent from user_tables;


** 다른 방법


1. alter and move the table to another tablespace. e.g. (다른 테이블 스페이스로 옮기기)

ALTER TABLE MY_TABLE MOVE TABLESPACE ANOTHER_TABLESPLACE STORAGE (INITIAL 2M NEXT 2M PCTINCREASE 0);

2. alter and move the table back to the original tablesace with the desired initial extent size, e.g. (원 테이블 스페이스에 옮기기)

ALTER TABLE MY_TABLE MOVE TABLESPACE ORIGINAL_TABLESPACE STORAGE (INITIAL 256M NEXT 2M PCTINCREASE 0);



- next 값 수정

위와 동일하며


alter table emp1 storage(next 10M);


으로 가능함 

반응형

'Database > ORACLE' 카테고리의 다른 글

도스 모드 sql 실행 bat 배치 만들기  (0) 2016.03.25
ndd 설정하기  (0) 2013.09.23
오라클 미디어 팩 신청하기  (0) 2013.01.31
one port multi listener 설정 하기  (0) 2012.12.24
DBMS_XPLAN 정보 조회  (0) 2012.09.07

+ Recent posts