728x90

오류 내용

ORA-39001 invalid argument value
ORA-39000 bad dump file specification
ORA-31619 invalid dump file “/덤프파일경로/파일이름“
ORA-27072 file i/o error

해결 방법

위의 오류 내용은 Export dump 백업이 아니라 기본 Export 백업으로 생성된 파일인데 Import dump 백업을 사용해 파일을 Import 할 때 발생되는 오류입니다. 위의 해결방법은 기본 Export로 백업을 진행하는 것이 아니라 Export dump를 사용해서 백업 파일을 생성하는 방법과 기본 Import로 Export 된 파일을 Import 받는 방법 2가지가 있습니다. 기본 Export 된 파일을 기본 Import로 파일을 Import 받았는데 속도가 너무 느리고 사용할 수 있는 옵션도 dump에 비해 사용할 수 있는 옵션이 적어 다시 Dump를 받을 수 있으면 Dump를 받는 것을 추천드립니다.

728x90

'Oracle > 오라클 이관' 카테고리의 다른 글

DataDump가 아닌 기본 exp, imp  (0) 2023.04.18
728x90

개요

이번에 데이터베이스 이관 프로젝트를 진행하면서 DataDump가 아닌 기본 exp, imp를 해야 하는 일이 발생되어 schema별로 exp 된 dmp 파일을 개발서버에 imp를 진행하는데 해당 schema 계정이 아닌 dump 하기 위해 생성한 계정으로 테이블이 imp 되어 기본 exp, imp 하는 방법에 대해 작성하게 되었다.

EXPORT

Full EXPORT

전체 데이터베이스가 Export 된다. 모든 테이블스페이스, 모든 사용자, 또한 모든 객체, 데이터들이 포함 된다.

exp system/manager file='dumpfile_생성경로/dumpfile_name.dmp' full=y

User EXPORT

사용자 자신이 만든 모든 오브젝트를 그 user가 EXPORT 하는 방법

exp scott/tiger file='dumpfile_생성경로/dumpfile_name.dmp'

비밀번호 특수문자 있을 시

exp userid='scott'/'tiger!^'  file='dumpfile_생성경로/dumpfile_name.dmp'

SYSTEM계정으로 특정 user소유의 오브젝트들을 EXPORT 하는 방법

exp system/manager owner=scott  file='dumpfile_생성경로/dumpfile_name.dmp'

Table EXPORT

SYSTEM계정으로 특정 유저의 table을 EXPORT 하는 예제

  • 다른 계정으로 EXPORT시 table의 user명까지 지정해야 EXPORT가 성공한다.
exp system/manager file='dumpfile_생성경로/dumpfile_name.dmp' tables=(usern_ame.table_name, scott.DEPT)

scott user로 table을 몇 개만 EXPORT하는 예제

  • 자신의 table을 EXPORT 할 때에는 user명을 지정할 필요가 없다.
exp scott/tiger file='dumpfile_생성경로/dumpfile_name.dmp' tables=(EMP, DEPT) log=exp.log

EXPORT 옵션

  • userid/passwd : EXPORT를 실행시키고 있는 username/password 명
  • file : 생성되는 EXPORT 덤프 파일명
  • full : 전체 데이터베이스를 EXPORT 할 것인가의 여부 (Y / N)
  • owner : EXPORT 될 데이터베이스의 소유자 명 [owner=user]
  • tables : EXPORT 될 테이블의 리스트 [tables=(table1, table2,...)]
  • log : EXPORT 실행 과정을 지정된 로그 파일에 저장

IMPORT

전체 데이터베이스가 IMPORT(Full Level Export file을 Import)

imp system/manager file='dumpfile_생성경로/dumpfile_name.dmp' full=y

User Export file을 Import

imp scott/tiger file='dumpfile_생성경로/dumpfile_name.dmp'

User Export file을 다른 계정으로 IMPORT

  • scott 유저의 데이터를 EXPORT 받아 test 유저에게 IMPORT 하는 예시
exp system/manager file='dumpfile_생성경로/dumpfile_name.dmp' owner=scott
imp system/manager file='dumpfile_생성경로/dumpfile_name.dmp' fromuser=scott touser=test

IMPORT 옵션

  • username/password : IMPORT를 실생 시키는 계정의 username/password 명
  • file : IMPORT 될 EXPORT 덤프 파일명
  • show : 파일 내용이 화면에 표시되어야 할 것인가를 나타냄(Y / N)
  • ignore : IMPORT 중 CREATE명령을 실행할 때 만나게 되는 에러들을 무시할 것인지 결정(Y / N)
  • full : FULL엑스포트 덤프 파일이 IMPORT 할 때 사용한다.
  • tables : IMPORT 될 테이블 리스트
  • commit : 배열(배열의 크기는 BUFFER에 의해 설정됩니다.) 단위로 COMMIT을 할 것인가 결정 기본적으로는 테이블 단위로 COMMIT을 한다.
  • fromuser : EXPORT덤프 파일로 부터 읽혀야 하는 객체들을 갖고 있는 데이터베이스 계정
  • touser : EXPORT덤프 안에 있는 객체들이 IMPORT 될 데이터베이스 계정

참고

https://godlvkhj.tistory.com/215

http://www.gurubee.net/lecture/1161

728x90

'Oracle > 오라클 이관' 카테고리의 다른 글

exp한 파일 impdp로 import하면 발생되는 오류  (0) 2023.04.20

+ Recent posts