Customise Consent Preferences

We use cookies to help you navigate efficiently and perform certain functions. You will find detailed information about all cookies under each consent category below.

The cookies that are categorised as "Necessary" are stored on your browser as they are essential for enabling the basic functionalities of the site. ... 

Always Active

Necessary cookies are required to enable the basic features of this site, such as providing secure log-in or adjusting your consent preferences. These cookies do not store any personally identifiable data.

No cookies to display.

Functional cookies help perform certain functionalities like sharing the content of the website on social media platforms, collecting feedback, and other third-party features.

No cookies to display.

Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics such as the number of visitors, bounce rate, traffic source, etc.

No cookies to display.

Performance cookies are used to understand and analyse the key performance indexes of the website which helps in delivering a better user experience for the visitors.

No cookies to display.

Advertisement cookies are used to provide visitors with customised advertisements based on the pages you visited previously and to analyse the effectiveness of the ad campaigns.

No cookies to display.

SKIP_CONSTRAINT_ERRORS As DATA_OPTION In Impdp

Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
  • User AvatarKiran Dalvi
  • 23 Nov, 2023
  • 0 Comments
  • 2 Mins Read

SKIP_CONSTRAINT_ERRORS As DATA_OPTION In Impdp

DATA_OPTIONS=SKIP_CONSTRAINT_ERRORS is a very useful parameter mostly used with table_exists_action=APPEND. DATA_OPTION=SKIP_CONSTRAINT_ERRORS parameter will help in skipping the duplicate row and import the rest of the rows. It is similar to IGNORE=Y option of classic exp/imp Here I tried to append data with table_exists_action=APPEND, it failed due to a unique key violation.
1
2
3
4
5
6
7
8
9
10
11
12
13
impdp dumpfile=unique.dmp directory=EXPDIR table_exists_action=APPEND
 
 
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Master table "SYS"."SYS_IMPORT_FULL_01" successfully loaded/unloaded
Starting "SYS"."SYS_IMPORT_FULL_01": /******** AS SYSDBA dumpfile=unique.dmp directory=EXPDIR table_exists_action=APPEND
Processing object type TABLE_EXPORT/TABLE/PROCACT_INSTANCE
Processing object type TABLE_EXPORT/TABLE/TABLE
Table "DBATEST"."GNSRT00" 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 "DBATEST"."GNSRT00" failed to load/unload and is being skipped due to error:
ORA-00001: unique constraint (DBATEST.RRN_PK_GNSRT00) violated
Job "SYS"."SYS_IMPORT_FULL_01" completed with 1 error(s) at THU NOV 23 10:31:28 2017 elapsed 0 00:00:11
Now let us try with SKIP_CONSTRAINT_ERRORS option:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
impdp dumpfile=unique.dmp directory=EXPDIR table_exists_action=APPEND data_options=SKIP_CONSTRAINT_ERRORS
 
 
Starting "SYS"."SYS_IMPORT_FULL_01": /******** AS SYSDBA dumpfile=unique.dmp directory=EXPDIR table_exists_action=APPEND data_options=SKIP_CONSTRAINT_ERRORS
Processing object type TABLE_EXPORT/TABLE/PROCACT_INSTANCE
Processing object type TABLE_EXPORT/TABLE/TABLE
Table "DBATEST"."GNSRT00" 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
. . imported "DBATEST"."GNSRT00" 9.078 KB 20 out of 22 rows ----- >>>
2 row(s) were rejected with the following error:
ORA-00001: unique constraint (DBATEST.RRN_PK_GNSRT00) violated
 
Rejected rows with the primary keys are:
Rejected row #1:
column RRN: 3
Rejected row #2:
column RRN: 4
Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX
Job "SYS"."SYS_IMPORT_FULL_01" successfully completed at THU NOV 23 10:33:07 2017 elapsed 0 00:00:07

Hope It Helps !