Search code examples
oracle-databaseimportoracle12cdatabase-administrationimpdp

ignored fields when importing data using impdp


I am trying to load it massively in my database and I noticed that by doing the following command if the table is empty it loads without problems, but if it has 1 record it ignores the entire table. am I using any parameter incorrectly?

impdp '/ as sysdba' directory=DATA_PUMP_DIR dumpfile=tst.bak remap_schema=bd1:bd1 
TABLE_EXISTS_ACTION=APPEND CONTENT=DATA_ONLY DATA_OPTIONS=SKIP_CONSTRAINT_ERRORS

Thank you

Edit: as referred by @pifor follow the errors presented:

ORA-31693: Table data object "bd1"."CRM_PARTY" failed to load/unload and is being skipped due to error:
ORA-00001: unique constraint (bd1.PK_CRM_PARTY) violated

Edit 2: as referred by @Alex Poole I confirm that the primary key is non deferrable

select deferrable, deferred
from user_constraints
where constraint_name = 'PK_CRM_PARTY';

NOT DEFERRABLE  |   IMMEDIATE

Solution

  • adding the IGNORE=Y command solves my problem. This is not to say that there is no bug on Oracle's part.

    impdp '/ as sysdba' directory=DATA_PUMP_DIR dumpfile=tst.bak remap_schema=bd1:bd1 
    TABLE_EXISTS_ACTION=APPEND CONTENT=DATA_ONLY DATA_OPTIONS=SKIP_CONSTRAINT_ERRORS IGNORE=Y