TOOL/DATABASE 2015. 12. 11. 15:57


덤프 뜨다. 덤프를 뜨다.

덤프를 뜬다. 덤프를 뜬다.



A라는 DB의 데이터를 백업하기 위해서 


또는 


A라는 DB의 데이터를 B라는 DB로 이관(마이그레이션, migration)하기 위해서


사용한다.




///// 덤프

- Export

- 추출하기 

테이블 A와 B만 추출

$ exp USERID/PW file=덤프파일명.dmp log=로그파일명.log tables=A,B


해당 오너의 정보 모두 추출하기

$ exp USERID/PW file=덤프파일명.dmp log=로그파일명.log Owner=USERID statistics=none


- Option for Export 

ignore : create table오류 무시하고 데이터만 때려 넣는다.
userid/passwd : export를 수행하는 계정/패스워드 

buffer : Evaluation Buffer크기 지정(용량이 클 수록 export 작업이 빨라진다) 

file : export 결과를 저장할 파일명 - full : 전체 DB를 export 할 것인가 지정

owner : xport 받을 사용자 이름지정 

tables : export 받을 테이블 이름 지정

tablespaces : exprot 받을 테이블스페이스 이름지정 

parfile : export 옵션을 미리 지정한 파라미터 파일지정


- Import

- 적재하기

테이블 A와 B만 적재

$ imp DBAID/PW tables=A, B ignore=y


테이블 정의만 Import하기 (row=no)

$ imp DBAID/PW fromuser=Export할때Owner명 file=덤프파일명.dmp log=로그파일명.log rows=no


데이터만 Import하기 (ignore=y)

$ imp DBAID/PW fromuser=Export할때Owner명 file=덤프파일명.dmp log=로그파일명.log ignore=y 


데이터베이스 전체를 import (full=y)

$ imp DBAID/PW fromuser=Export할때Owner명 file=덤프파일명.dmp log=로그파일명.log full=y 


Export한 데이터를 다른User로 Import

$ imp DBAID/PW fromuser=Export할때Owner명 touser=데이터를가질유저 file=덤프파일명.dmp log=로그파일명.log


- Option for Export

userid/passwd : import를 수행하는 계정/패스워드 

buffer : Evaluation Buffer크기 지정(용량이 클 수록 import 작업이 빨라진다) 

full : export 파일의 모든 데이터를 import 한다. 

file : import 할 export 파일명 지정 

show : 데이터를 import 하지 않고 내용만 확인함 

ignore : import 작업 중 발생할 수 있는 에러를 무시하고 다음단계의 작업을 진행함

fromuser : export 할 당시의 object의 소유자 지정 

touser : import 할 object의 새 소유자 지정 

tables : import 할 테이블 이름 지정 - parfile : import 옵션을 미리 지정한 파라미터 파일지정


- Export시 에러(Error)

- 문제 : 

EXP-00091 exporting questionable statistics

해결 : 

statistics=none 옵션을 추가해서 Export(exp)하고 statistics=safe 옵션을 추가해서 Import(imp)하기. 

참조 : 

http://naomigom.tistory.com/53

http://blog.naver.com/kkhigh5/30009122730


- 문제 : 

EXP-00056: ORACLE error 2149 encountered

ORA-02149: Specified partition does not exist

EXP-00113: Feature New Composite Partitioning Method is unsupported. Table META3_I18N.PARTTESTTABLE could not be exported

해결 : 

지원 안 한다. 펌프(PUMP)를 써라... 헐..

참조 : 

https://community.oracle.com/thread/2189772?tstart=0



- Import시 에러(Error)

- 문제 : 

IMP-00058: ORACLE error 1034 encountered 

ORA-01034: ORACLE not available 

ORA-27101: shared memory realm does not exist Linux Error: 2: No such file or directory 

IMP-00005: all allowable logon attempts failed

IMP-00000: Import terminated unsuccessfully

해결 : 

db를 mount시킨다.

$ sqlplus / as sysdba

SQL> startup



- 문제 : 

import done in US7ASCII character set and AL16UTF16 NCHAR character set

import server uses KO16MSWIN949 character set (possible charset conversion)

해결 :


- 문제 : 
ORA-01435: user does not exist
해결 : 
user를 만들어라
SQL> create user 유저명 ...;

- 문제 : 

IMP-00003: ORACLE error 1658 encountered

해결 :


- 문제 : 

ORA-01658: unable to create INITIAL extent for segment in tablespace META_DATA

해결 : 


- 문제 : 

IMP-00017: following statement failed with ORACLE error 1658:

해결 :


- 문제 :

IMP-00017: following statement failed with ORACLE error 2430:

해결 : 


- 문제 : 

IMP-00003: ORACLE error 2270 encountered

ORA-02270: no matching unique or primary key for this column-list

해결 :

- 문제 : 
IMP-00015: following statement failed because the object already exists:
해결 :





///// 참고

오라클 데이터 펌프 : http://blog.naver.com/whdahek/220302449425

오라클 데이터 펌프로 export/import 받기 : http://tomasblue.tistory.com/75

오라클 백업 및 복구(Export, Import) : http://www.jigi.net/4243

이관 - 오라클 exp/imp Utility : http://blog.naver.com/itisksc/30046150481