we have etl job which will take data from a dataset and load into the table through oracle enterprise stage
the option in oracle enterprise stage is
The table has unique constraint defined on two columns col1,col2Write Method=Load
Write Mode=Append
the issue we are facing now is, there is already a record present with the values C1 and C2 for the mentioned two columns as unique constraint. and the record is again coming from source with the same value C1 and C2.
When we used the load and append method the job is getting aborted with the error
i have checked the data in the log file mentioned and the data in it isTGT_INS,3: The call to sqlldr failed; the return code = 2;
please see the loader logfile: /IBM_DS/Datastage/InformationServer/Server/Scratch/ora.9109944.740917.3.log for details.
and data in the ctl file /IBM_DS/Datastage/InformationServer/Server/Scratch/ora.9109944.740917.3.ctl isSQL*Loader: Release 11.1.0.7.0 - Production on Mon Aug 1 17:13:01 2011
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Control File: ora.7274830.660236.3.ctl
Data File: ora.7274830.660236.fifo.3
File processing option string: "FIX 135"
Bad File: ora.7274830.660236.3.log.bad
Discard File: none specified
(Allow all discards)
Number to load: ALL
Number to skip: 0
Errors allowed: 50
Bind array: 64 rows, maximum of 256000 bytes
Continuation: none specified
Path used: Conventional
Table schema1_tgt.ACCT_PKG_DTL, loaded from every logical record.
Insert option in effect for this table: APPEND
Column Name Position Len Term Encl Datatype
------------------------------ ---------- ----- ---- ---- ---------------------
"col1" 1:20 20 PACKED DECIMAL (38, 0)
NULL if 20:20 = BLANKS
"col2" 21:39 19 DATE YYYY-MM-DD HH24:MI:SS
"col3" 40:103 64 CHARACTER
"col4" 104:135 32 CHARACTER
Record 1: Rejected - Error on table schema1_tgt.ACCT_PKG_DTL.
ORA-00001: unique constraint (schema1_tgt.JYU) violated
Table schema1_tgt.ACCT_PKG_DTL:
2 Rows successfully loaded.
1 Row not loaded due to data errors.
0 Rows not loaded because all WHEN clauses were failed.
0 Rows not loaded because all fields were null.
Space allocated for bind array: 9216 bytes(64 rows)
Read buffer bytes: 1048576
Total logical records skipped: 0
Total logical records read: 3
Total logical records rejected: 1
Total logical records discarded: 0
Run began on Mon Aug 01 17:13:01 2011
Run ended on Mon Aug 01 17:13:01 2011
Elapsed time was: 00:00:00.53
CPU time was: 00:00:00.02
we are not facing this issue if the records coming from source are different(unique constraints columns differing).OPTIONS(DIRECT=FALSE,PARALLEL=TRUE)
LOAD DATA INFILE 'ora.7274830.660236.fifo.3' "FIX 135"
APPEND INTO TABLE schema1_tgt.ACCT_PKG_DTL
(
"col1" POSITION (1:20) decimal(38,0) NULLIF (20) = BLANKS ,
"col2" POSITION (21:39) date "YYYY-MM-DD HH24:MI:SS",
"col3" POSITION (40:103) char,
"col4" POSITION (104:135) char
)
we have not mentioned anything for the index mode since we cannot rebuild the indexes(as duplicate might exist and index creation fails in that case) and the maintainance option can be set only for partition table.
please help is solving this issue.
thanks