오라클 impdp 할때 에러나는 이유 알려주세요 0 4 3,007

by njnj [Oracle 백업/복구] [2020.08.06 13:29:12]


[oracle@centos expdp]$ impdp scott/tiger@oraDB11g tables=dept directory=test_dir dumpfile=dept.dmp logfile=expdpdept.log parallel=4 table_exists_action=append

Import: Release 11.2.0.4.0 - Production on Thu Aug 6 13:22:41 2020

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Master table "SCOTT"."SYS_IMPORT_TABLE_01" successfully loaded/unloaded
Starting "SCOTT"."SYS_IMPORT_TABLE_01":  scott/********@oraDB11g tables=dept directory=test_dir dumpfile=dept.dmp logfile=expdpdept.log parallel=4 table_exists_action=append
Processing object type TABLE_EXPORT/TABLE/TABLE
Table "SCOTT"."DEPT" exists. Data will be appended to existing table but all dependent metadata will be skipped due to table_exists_action of append
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
ORA-31693: Table data object "SCOTT"."DEPT" failed to load/unload and is being skipped due to error:
ORA-00001: unique constraint (SCOTT.PK_DEPT) violated
Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX
Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Job "SCOTT"."SYS_IMPORT_TABLE_01" completed with 1 error(s) at Thu Aug 6 13:22:43 2020 elapsed 0 00:00:02

 

어떤게 문제인지 잘모르겠네요.. scott유저에 DEPTNO가 PK라 안되는건지... table_exists_action=append 옵션주고 나머지 데이터만 추가하려는데 안되네요...

by 마농 [2020.08.06 14:03:09]

성공한 듯 한데요?
completed with 1 error(s) --> 에러 1건 발생 외에는 성공이라는 뜻 아닌가요?
ORA-00001: unique constraint (SCOTT.PK_DEPT) violated --> PK 중복으로 인한 에러네요.


by njnj [2020.08.06 14:12:36]

네 성공했다고 나오는데 

scott.dept 행 9개를 expdp 했고

impdp 할 scott 는 행이 4개(expdp한 9개 행중 4개 중복)인데 나머지 5개의 행이 안들어와있네요...


by 마농 [2020.08.06 14:33:51]

DATA_OPTIONS=SKIP_CONSTRAINT_ERRORS


by njnj [2020.08.06 14:49:49]

해결했습니다. 감사합니다.

댓글등록
SQL문을 포맷에 맞게(깔끔하게) 등록하려면 code() 버튼을 클릭하여 작성 하시면 됩니다.
로그인 사용자만 댓글을 작성 할 수 있습니다. 로그인, 회원가입