1. Oracle 9i까지 사용되는 exp, imp 유틸리티보다 향상된 Oracle 10g의 기능: 속도와 사용자 편의성
2. 환경설정
directory 객체를 통해 간접 접근이 가능
datapump사용을 위해 directory가 만들어져 있어야 하며 사용자에 접근권한 부여
SQL> DROP DIRECTORY dpump_dir2; -- 기존 디렉토리 dpump_dir2 drop
SQL> create or replace directory datapump as ‘/dpdump/EXP_DIR’;
SQL> grant read,write on directory datapump to scott;
SQL> grant create any directory to scott;
SQL> SELECT * FROM dba_directories; --디렉토리 Name,디렉토리 Path 알아보기
3. 콘솔에서 데이터 백업
expdp scott/tiger DIRECTORY=EXP_DIR DUMPFILE=scottdmp.dmp LOGFILE=scottdmp.log
4. impdp
impdp scott/tiger DIRECTORY=EXP_DIR DUMPFILE=scottdmp.dmp REMAP_SCHEMA=scott:newscott
REMAP_DATAFILE='C:\user01.dbf':'/usr/data/user01.dbf' (데이터 파일 변경)
REMAP_TABLESPACE='xxx':'yyy' (테이블스페이스 변경)
5. index rebuild 결과 실행
select 'alter index '||index_name||' rebuild tablespace SCOTT_INDEX;' from user_indexes
where tablespace_name='SCOTT_DATA';
파라미터 정리 및 참조
http://xfree302.tistory.com/159
http://blog.naver.com/saimoo/100143104217
http://blog.naver.com/itisksc/30088616193
'oracle' 카테고리의 다른 글
Oracle 2개월차 심화학습 (0) | 2016.06.29 |
---|---|
oracle 1개월차 심화학습 (0) | 2016.05.30 |
그룹함수 (0) | 2016.05.04 |
Transaction ACID (0) | 2016.05.03 |
Natural Key & Surrogate Key (0) | 2016.05.03 |